Skip to content

Commit 521f1a0

Browse files
committed
Only set channel on linux
1 parent 88cf777 commit 521f1a0

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/scripts/setup-env.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ echo '::endgroup::'
100100

101101
echo '::group::Install torchvision-extra-decoders'
102102
# This can be done after torchvision was built
103-
pip install torchvision-extra-decoders --pre --index-url https://download.pytorch.org/whl/nightly/cpu
103+
if [[ "$(uname)" == "Linux" ]]; then
104+
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"
105+
else
106+
extra_decoders_channel=""
107+
fi
108+
109+
pip install torchvision-extra-decoders $extra_decoders_channel
104110
echo '::endgroup::'
105111

106112
echo '::group::Collect environment information'

packaging/post_build_script.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
22
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
33

4-
pip install torchvision-extra-decoders --pre --index-url https://download.pytorch.org/whl/nightly/cpu
4+
if [[ "$(uname)" == "Linux" ]]; then
5+
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"
6+
else
7+
extra_decoders_channel=""
8+
fi
9+
10+
pip install torchvision-extra-decoders $extra_decoders_channel

0 commit comments

Comments
 (0)