Skip to content

Commit

Permalink
use index-url
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Feb 26, 2024
1 parent b8d964f commit 7ad4887
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-export-matrix-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
installation:
- pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
with:
binary-matrix: ${{ toJSON(matrix) }}
script: |
Expand All @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
installation:
- pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
with:
binary-matrix: ${{ toJSON(matrix) }}
script: |
Expand All @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
installation:
- pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
with:
binary-matrix: ${{ toJSON(matrix) }}
script: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_build_wheels_linux_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

# test
permissions:
id-token: write
contents: read
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_build_wheels_windows_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ permissions:
id-token: write
contents: read

# test/test
jobs:
generate-matrix:
uses: ./.github/workflows/generate_binary_build_matrix.yml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_macos_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python3 -m pip install --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch
python3 -c 'import torch'
test-m1:
Expand All @@ -34,7 +34,7 @@ jobs:
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python3 -m pip install --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch, cuda is available
python3 -c 'import torch'
test-x86-with-repo:
Expand All @@ -49,7 +49,7 @@ jobs:
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python3 -m pip install --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch
python3 -c 'import torch'
test-m1-with-repo:
Expand All @@ -66,7 +66,7 @@ jobs:
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python3 -m pip install --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
python3 -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch, cuda is available
python3 -c 'import torch'
test-upload-artifact:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_windows_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python -m pip install --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
python -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch
python -c 'import torch'
test-gpu:
Expand Down
3 changes: 1 addition & 2 deletions tools/scripts/generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ def get_wheel_install_command(
use_only_dl_pytorch_org: bool,
) -> str:

index_url_option = "--index-url" if os != LINUX_AARCH64 else "--extra-index-url"
if channel == RELEASE and (not use_only_dl_pytorch_org) and (
(gpu_arch_version == "12.1" and os == LINUX)
or (
Expand All @@ -289,7 +288,7 @@ def get_wheel_install_command(
if channel == "nightly"
else f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}"
)
return f"{whl_install_command} {index_url_option} {get_base_download_url_for_repo('whl', channel, gpu_arch_type, desired_cuda)}"
return f"{whl_install_command} --index-url {get_base_download_url_for_repo('whl', channel, gpu_arch_type, desired_cuda)}"


def generate_conda_matrix(
Expand Down

0 comments on commit 7ad4887

Please sign in to comment.