File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
package_type=" $PACKAGE_TYPE "
3
- channel=" $CHANNEl "
3
+ channel=" $CHANNEL "
4
4
if [ -z " $package_type " ]; then
5
5
package_type=" wheel"
6
6
fi
@@ -33,14 +33,7 @@ $install_cmd torchdata $install_channel
33
33
if [ " $package_type " = " wheel" ]; then
34
34
TORCHDATA_VERSION=" $( pip show torchdata | grep ^Version: | sed ' s/Version: *//' | sed ' s/+.\+//' ) "
35
35
else
36
- TORCHDATA_VERSION=" $( conda search --json ' torchdata[channel=pytorch-' " ${channel} " ] | \
37
- python -c " import json, os, re, sys; \
38
- cuver = 'cpu'; \
39
- pyver = os.environ.get('PYTHON_VERSION').replace('.', ''); \
40
- print(re.sub(r'\\ +.*$', '',
41
- [x['version'] for x in json.load(sys.stdin)['torchdata'] \
42
- if 'py' + pyver in x['fn']][-1]))"
43
- ) "
36
+ TORCHDATA_VERSION=" $( conda list -fe torchdata | grep torchdata | sed -e ' s/torchdata=\(.*\)=py.*/\1/' ) "
44
37
echo " export CONDA_TORCHDATA_CONSTRAINT='- torchdata==${TORCHDATA_VERSION} '" >> " ${BUILD_ENV_FILE} "
45
38
fi
46
39
You can’t perform that action at this time.
0 commit comments