Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 88640b0

Browse files
committed
Use UPLOAD_CHANNEL in pkg_helpers.bash
1 parent de49c79 commit 88640b0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packaging/pkg_helpers.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ setup_pip_pytorch_version() {
162162
if [[ -z "$PYTORCH_VERSION" ]]; then
163163
# Install latest prerelease version of torch, per our nightlies, consistent
164164
# with the requested cuda version
165-
pip_install --pre torch -f "https://download.pytorch.org/whl/nightly/${WHEEL_DIR}torch_nightly.html"
165+
pip_install --pre torch -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/${WHEEL_DIR}torch_${UPLOAD_CHANNEL}.html"
166166
if [[ "$CUDA_VERSION" == "cpu" ]]; then
167167
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
168168
# in this case
@@ -172,8 +172,8 @@ setup_pip_pytorch_version() {
172172
fi
173173
else
174174
pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
175-
-f https://download.pytorch.org/whl/torch_stable.html \
176-
-f https://download.pytorch.org/whl/nightly/torch_nightly.html
175+
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html" \
176+
-f https://download.pytorch.org/whl/torch_stable.html
177177
fi
178178
}
179179

@@ -183,10 +183,10 @@ setup_pip_pytorch_version() {
183183
# You MUST have populated PYTORCH_VERSION_SUFFIX before hand.
184184
setup_conda_pytorch_constraint() {
185185
if [[ -z "$PYTORCH_VERSION" ]]; then
186-
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly"
187-
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']))")"
186+
export CONDA_CHANNEL_FLAGS="-c pytorch-${UPLOAD_CHANNEL}"
187+
export PYTORCH_VERSION="$(conda search --json "pytorch[channel=pytorch-${UPLOAD_CHANNEL}]" | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
188188
else
189-
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-nightly"
189+
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}"
190190
fi
191191
if [[ "$CU_VERSION" == cpu ]]; then
192192
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"

0 commit comments

Comments
 (0)