Skip to content

Commit 6914199

Browse files
authored
Install PyTorch from PyPi (#437)
1 parent 021e509 commit 6914199

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.github/workflows/_build_linux.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,20 @@ jobs:
8989

9090
- name: Unit test
9191
run: |
92+
# Install SPDL
9293
pip install $(find "${HOME}/package" -name '*.whl' -depth -maxdepth 1)
94+
95+
# Install PyTorch and others
96+
pip install numpy torch --index-url https://download.pytorch.org/whl/cpu
97+
conda install -q numba pytest
98+
99+
# Install FFmpeg
93100
# Note: Somehow FFmepg 5.1 does not install libiconv so specifying it here
94101
conda install -q -c conda-forge "ffmpeg==${{ matrix.ffmpeg-version }}" libiconv
95-
conda install -q -c pytorch numpy pytest pytorch numba
96102
# For some reason, the dynamic libraries are not found.
97103
export "LD_LIBRARY_PATH=${CONDA_PREFIX}/lib"
104+
105+
# Run test
98106
pytest -v \
99107
tests/spdl_unittest/io/ \
100108
tests/spdl_unittest/dataloader/

.github/workflows/_build_linux_cuda.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,20 @@ jobs:
114114

115115
- name: Unit test
116116
run: |
117+
# Install SPDL
117118
pip install $(find "${HOME}/package" -name '*.whl' -depth -maxdepth 1)
119+
120+
# Install PyTorch and others
121+
pip install pytest
122+
pip install numpy nvidia-cuda-runtime-cu12 torch --index-url https://download.pytorch.org/whl/cu126
123+
124+
# Install FFmpeg
118125
conda install -q -c conda-forge "ffmpeg==${{ matrix.ffmpeg-version }}"
119126
# For some reason, the FFmpeg dynamic libraries are not found.
120127
export "LD_LIBRARY_PATH=${CONDA_PREFIX}/lib"
121128
# TODO: clean up the logic for versions
122-
pip install nvidia-cuda-runtime-cu12 torch --index-url https://download.pytorch.org/whl/cu126
123-
pip install pytest
129+
130+
# Run test
124131
pytest -v \
125132
tests/spdl_unittest/cuda/ \
126133
tests/spdl_unittest/io/

.github/workflows/_build_macos.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,15 @@ jobs:
7878

7979
- name: Unit test
8080
run: |
81+
# Install SPDL
8182
pip install $(find "${HOME}/package" -name '*.whl' -depth -maxdepth 1)
83+
84+
# Install PyTorch and others
85+
pip install torch numpy numba pytest
86+
87+
# Install FFmpeg
8288
conda install -q -c conda-forge "ffmpeg==${{ matrix.ffmpeg-version }}"
83-
conda install -q -c pytorch numpy pytest pytorch numba
89+
8490
pytest -v \
8591
tests/spdl_unittest/io/ \
8692
tests/spdl_unittest/dataloader/

0 commit comments

Comments
 (0)