From b584523f37a510f6e350c5ab99b1e3c1811b59b6 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Mon, 26 Feb 2024 12:29:29 -0800 Subject: [PATCH] Use index-url when installing from pip (#2353) Summary: See install instructions in: https://pytorch.org/get-started/locally/ Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/2353 Reviewed By: flaviotruzzi Differential Revision: D54203217 Pulled By: atalman fbshipit-source-id: f412077df8bd00997419432d0ee803466249c973 --- .github/scripts/utils_pip.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/utils_pip.bash b/.github/scripts/utils_pip.bash index 91967e166..5a9326d2e 100644 --- a/.github/scripts/utils_pip.bash +++ b/.github/scripts/utils_pip.bash @@ -186,7 +186,7 @@ install_from_pytorch_pip () { echo "[INSTALL] Attempting to install [${package_name}, ${package_version:-LATEST}] from PyTorch PIP using channel ${pip_channel} ..." # shellcheck disable=SC2086 - (exec_with_retries 3 conda run ${env_prefix} pip install ${pip_package} --extra-index-url ${pip_channel}) || return 1 + (exec_with_retries 3 conda run ${env_prefix} pip install ${pip_package} --index-url ${pip_channel}) || return 1 # Check only applies to non-CPU variants if [ "$package_variant_type" != "cpu" ]; then @@ -242,7 +242,7 @@ download_from_pytorch_pip () { echo "[DOWNLOAD] Attempting to download wheel [${package_name}, ${package_version:-LATEST}] from PyTorch PIP using channel ${pip_channel} ..." # shellcheck disable=SC2086 - (exec_with_retries 3 conda run ${env_prefix} pip download ${pip_package} --extra-index-url ${pip_channel}) || return 1 + (exec_with_retries 3 conda run ${env_prefix} pip download ${pip_package} --index-url ${pip_channel}) || return 1 # Ensure that the package build is of the correct variant # This test usually applies to the nightly builds