Skip to content

Commit

Permalink
Use index-url when installing from pip (#2353)
Browse files Browse the repository at this point in the history
Summary:
See install instructions in: https://pytorch.org/get-started/locally/

Pull Request resolved: #2353

Reviewed By: flaviotruzzi

Differential Revision: D54203217

Pulled By: atalman

fbshipit-source-id: f412077df8bd00997419432d0ee803466249c973
  • Loading branch information
atalman authored and facebook-github-bot committed Feb 26, 2024
1 parent 2bba5cc commit b584523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/utils_pip.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b584523

Please sign in to comment.