From 43e2f8f7e9a8cfee658a4e99735edf5d48243b90 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sat, 19 Mar 2022 18:18:55 -0700 Subject: [PATCH 1/3] Prefer nvidia channel for conda builds --- packaging/build_conda.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 2d5d72f3ad2..b127e0f10fa 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -18,4 +18,4 @@ if [[ "$CU_VERSION" == cu115 ]]; then export CUDATOOLKIT_CHANNEL="conda-forge" fi -conda build -c defaults -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision +conda build -c $CUDATOOLKIT_CHANNEL -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From 705979887c80dbf3b2e8bb89d53c53e761b351d7 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sat, 19 Mar 2022 21:17:16 -0700 Subject: [PATCH 2/3] And same for unittests --- .circleci/unittest/linux/scripts/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index b29fd3e09b8..59e033fea2b 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -21,7 +21,7 @@ else fi echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION" version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" - cudatoolkit="cudatoolkit=${version}" + cudatoolkit="nvidia::cudatoolkit=${version}" fi case "$(uname -s)" in @@ -33,7 +33,7 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}" if [ "${os}" == "MacOSX" ]; then conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest else - conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest + conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest fi printf "* Installing torchvision\n" From 876bb3063a03bf4d60d365a5147ff27eec5c92d7 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Mon, 21 Mar 2022 09:52:17 -0700 Subject: [PATCH 3/3] And here --- packaging/build_cmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/build_cmake.sh b/packaging/build_cmake.sh index 227b2b39519..17b62c55d82 100755 --- a/packaging/build_cmake.sh +++ b/packaging/build_cmake.sh @@ -42,7 +42,7 @@ else PYTORCH_MUTEX_CONSTRAINT='' fi -conda install -yq \pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $PYTORCH_MUTEX_CONSTRAINT $MKL_CONSTRAINT numpy -c "pytorch-${UPLOAD_CHANNEL}" +conda install -yq \pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $PYTORCH_MUTEX_CONSTRAINT $MKL_CONSTRAINT numpy -c nvidia -c "pytorch-${UPLOAD_CHANNEL}" TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)")) if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then