Skip to content

Commit af04819

Browse files
authored
Fix cpu instals in circleci (#7357)
1 parent cd33246 commit af04819

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.circleci/unittest/linux/scripts/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ else
2222
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION: ${CU_VERSION} "
2323
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
2424
cudatoolkit="pytorch-cuda=${version}"
25+
26+
# make sure local cuda is set to required cuda version and not CUDA version by default
27+
rm -f /usr/local/cuda
28+
ln -s /usr/local/cuda-${version} /usr/local/cuda
2529
fi
2630

2731
case "$(uname -s)" in
@@ -34,10 +38,6 @@ if [ "${os}" == "MacOSX" ]; then
3438
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}"
3539
else
3640
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}"
37-
38-
# make sure local cuda is set to required cuda version and not CUDA version by default
39-
rm -f /usr/local/cuda
40-
ln -s /usr/local/cuda-${version} /usr/local/cuda
4141
fi
4242

4343

0 commit comments

Comments
 (0)