diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 33232a78d9f..8bb61789cdf 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -100,7 +100,13 @@ echo '::endgroup::' echo '::group::Install torchvision-extra-decoders' # This can be done after torchvision was built -pip install torchvision-extra-decoders +if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then + extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu" +else + extra_decoders_channel="" +fi + +pip install torchvision-extra-decoders $extra_decoders_channel echo '::endgroup::' echo '::group::Collect environment information' diff --git a/packaging/post_build_script.sh b/packaging/post_build_script.sh index 253980b98c3..5b7414b2f03 100644 --- a/packaging/post_build_script.sh +++ b/packaging/post_build_script.sh @@ -1,4 +1,10 @@ #!/bin/bash LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py -pip install torchvision-extra-decoders +if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then + extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu" +else + extra_decoders_channel="" +fi + +pip install torchvision-extra-decoders $extra_decoders_channel