diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index a15c1458dc7..6375e191072 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -22,6 +22,10 @@ else echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION: ${CU_VERSION} " version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" cudatoolkit="pytorch-cuda=${version}" + + # make sure local cuda is set to required cuda version and not CUDA version by default + rm -f /usr/local/cuda + ln -s /usr/local/cuda-${version} /usr/local/cuda fi case "$(uname -s)" in @@ -34,10 +38,6 @@ if [ "${os}" == "MacOSX" ]; then conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" else conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" - - # make sure local cuda is set to required cuda version and not CUDA version by default - rm -f /usr/local/cuda - ln -s /usr/local/cuda-${version} /usr/local/cuda fi