Skip to content

Commit

Permalink
Fix cpu instals in circleci (pytorch#7357)
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman authored and NicolasHug committed Feb 27, 2023
1 parent 4666831 commit 8b122c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/unittest/linux/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 8b122c4

Please sign in to comment.