Skip to content

Commit ba00419

Browse files
authored
Update package script to use UPLOAD_CHANNEL env (#962)
1 parent 6a0053e commit ba00419

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packaging/pkg_helpers.bash

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ setup_pip_pytorch_version() {
171171
else
172172
pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
173173
-f https://download.pytorch.org/whl/torch_stable.html \
174-
-f https://download.pytorch.org/whl/test/torch_test.html \
175-
-f https://download.pytorch.org/whl/nightly/torch_nightly.html
174+
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
176175
fi
177176
}
178177

@@ -185,7 +184,7 @@ setup_conda_pytorch_constraint() {
185184
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly"
186185
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
187186
else
188-
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-test -c pytorch-nightly"
187+
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}"
189188
fi
190189
if [[ "$CU_VERSION" == cpu ]]; then
191190
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"

0 commit comments

Comments
 (0)