Unverified Commit 107718c8 authored by Eli Uriegas's avatar Eli Uriegas Committed by GitHub
Browse files

packaging: Always strip version suffix for pytorch (#1185)



torchaudio can work with any version of pytorch so let's strip the
pytorch version suffix to denote that
Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>
parent f5aced81
......@@ -162,13 +162,8 @@ setup_pip_pytorch_version() {
# Install latest prerelease version of torch, per our nightlies, consistent
# with the requested cuda version
pip_install --pre torch -f "https://download.pytorch.org/whl/nightly/${WHEEL_DIR}torch_nightly.html"
if [[ "$CUDA_VERSION" == "cpu" ]]; then
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
# in this case
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip in this case
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
else
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//')"
fi
else
pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
-f https://download.pytorch.org/whl/torch_stable.html \
......
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