Commit 2e4c2a1f authored by Eli Uriegas's avatar Eli Uriegas Committed by Soumith Chintala
Browse files

packaging: Install correct version of pytorch for pip (#412)



CUDA_SUFFIX was still being used here when it should've been swapped out
for PYTORCH_VERSION_SUFFIX, which is what's being used for conda below.
Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>
(cherry picked from commit 009b115d074ac5fcca2cc34662fe814df63324c1)
Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>
parent c4565245
...@@ -168,7 +168,7 @@ setup_pip_pytorch_version() { ...@@ -168,7 +168,7 @@ setup_pip_pytorch_version() {
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//')" export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//')"
fi fi
else else
pip_install "torch==$PYTORCH_VERSION$CUDA_SUFFIX" \ pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
-f https://download.pytorch.org/whl/torch_stable.html \ -f https://download.pytorch.org/whl/torch_stable.html \
-f https://download.pytorch.org/whl/nightly/torch_nightly.html -f https://download.pytorch.org/whl/nightly/torch_nightly.html
fi fi
...@@ -177,7 +177,7 @@ setup_pip_pytorch_version() { ...@@ -177,7 +177,7 @@ setup_pip_pytorch_version() {
# Fill PYTORCH_VERSION with the latest conda nightly version, and # Fill PYTORCH_VERSION with the latest conda nightly version, and
# CONDA_CHANNEL_FLAGS with appropriate flags to retrieve these versions # CONDA_CHANNEL_FLAGS with appropriate flags to retrieve these versions
# #
# You MUST have populated CUDA_SUFFIX before hand. # You MUST have populated PYTORCH_VERSION_SUFFIX before hand.
setup_conda_pytorch_constraint() { setup_conda_pytorch_constraint() {
if [[ -z "$PYTORCH_VERSION" ]]; then if [[ -z "$PYTORCH_VERSION" ]]; then
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly" export CONDA_CHANNEL_FLAGS="-c pytorch-nightly"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment