Skip to content

Commit 1d0c335

Browse files
authored
[CI] Fix windows CI (#954)
1 parent cc9fa73 commit 1d0c335

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.circleci/unittest/windows_optdepts/scripts/install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ fi
3838
git submodule sync && git submodule update --init --recursive
3939

4040
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
41-
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia pytorch "${cudatoolkit}"
41+
if $torch_cuda ; then
42+
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118
43+
else
44+
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
45+
fi
4246

4347
torch_cuda=$(python -c "import torch; print(torch.cuda.is_available())")
4448
echo torch.cuda.is_available is $torch_cuda

.circleci/unittest/windows_optdepts/scripts/setup_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ conda activate "${env_dir}"
3737
# 3. Install Conda dependencies
3838
printf "* Installing dependencies (except PyTorch)\n"
3939
conda env update --file "${this_dir}/environment.yml" --prune
40+
41+
# we don't use torchsnapshot
42+
conda env config vars set CKPT_BACKEND=torch

0 commit comments

Comments
 (0)