Skip to content

Commit 230abbf

Browse files
authored
Install cuda-enabled torchvision (#298)
1 parent 125bc1e commit 230abbf

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/linux_cuda_wheel.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,25 @@ jobs:
8282
name: pytorch_torchcodec__3.9_cu${{ env.cuda_version_without_periods }}_x86_64
8383
path: pytorch/torchcodec/dist/
8484
- name: Setup miniconda using test-infra
85-
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
85+
uses: ahmadsharif1/test-infra/.github/actions/setup-miniconda@cbdb2bb4b0206cf85e042b40606c8e6017d7b7c7
8686
with:
8787
python-version: ${{ matrix.python-version }}
88-
default-packages: "conda-forge::ffmpeg=${{ matrix.ffmpeg-version-for-tests }}"
88+
#
89+
# For some reason nvidia::libnpp=12.4 doesn't install but nvidia/label/cuda-12.4.0::libnpp does.
90+
# So we use the latter convention for libnpp.
91+
# We install conda packages at the start because otherwise conda may have conflicts with dependencies.
92+
default-packages: "nvidia/label/cuda-${{ matrix.cuda-version }}.0::libnpp nvidia::cuda-nvrtc=${{ matrix.cuda-version }} nvidia::cuda-toolkit=${{ matrix.cuda-version }} nvidia::cuda-cudart=${{ matrix.cuda-version }} nvidia::cuda-driver-dev=${{ matrix.cuda-version }} conda-forge::ffmpeg=${{ matrix.ffmpeg-version-for-tests }}"
8993
- name: Check env
9094
run: |
9195
${CONDA_RUN} env
9296
${CONDA_RUN} conda info
9397
${CONDA_RUN} nvidia-smi
98+
${CONDA_RUN} conda list
9499
- name: Update pip
95100
run: ${CONDA_RUN} python -m pip install --upgrade pip
96101
- name: Install PyTorch
97102
run: |
98-
${CONDA_RUN} python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }}
103+
${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }}
99104
${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")'
100105
- name: Install torchcodec from the wheel
101106
run: |
@@ -106,14 +111,8 @@ jobs:
106111
- name: Check out repo
107112
uses: actions/checkout@v3
108113

109-
- name: Install cuda runtime dependencies
110-
run: |
111-
# For some reason nvidia::libnpp=12.4 doesn't install but nvidia/label/cuda-12.4.0::libnpp does.
112-
# So we use the latter convention for libnpp.
113-
${CONDA_RUN} conda install --yes nvidia/label/cuda-${{ matrix.cuda-version }}.0::libnpp nvidia::cuda-nvrtc=${{ matrix.cuda-version }} nvidia::cuda-toolkit=${{ matrix.cuda-version }} nvidia::cuda-cudart=${{ matrix.cuda-version }} nvidia::cuda-driver-dev=${{ matrix.cuda-version }}
114114
- name: Install test dependencies
115115
run: |
116-
${CONDA_RUN} python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
117116
# Ideally we would find a way to get those dependencies from pyproject.toml
118117
${CONDA_RUN} python -m pip install numpy pytest pillow
119118

0 commit comments

Comments
 (0)