Skip to content

Commit 8c77f14

Browse files
committed
Install cpu version of torch on ubuntu
1 parent 69d725c commit 8c77f14

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macOS-latest]
15-
python: ['3.8', '3.7']
15+
python: ['3.8']
16+
torch: ['1.5.0']
17+
torchvision: ['0.6.0']
1618
runs-on: ${{ matrix.os }}
1719

1820
steps:
@@ -21,10 +23,18 @@ jobs:
2123
uses: actions/setup-python@v1
2224
with:
2325
python-version: ${{ matrix.python }}
24-
- name: Install dependencies
26+
- name: Install testing dependencies
2527
run: |
2628
python -m pip install --upgrade pip
2729
pip install pytest pytest-timeout
30+
- name: Install torch on mac
31+
if: startsWith(matrix.os, 'macOS')
32+
run: pip install torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }}
33+
- name: Install torch on ubuntu
34+
if: startsWith(matrix.os, 'ubuntu')
35+
run: pip install torch==${{ matrix.torch }}+cpu torchvision==${{ matrix.torchvision }}+cpu -f https://download.pytorch.org/whl/torch_stable.html
36+
- name: Install requirements
37+
run: |
2838
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
2939
pip install scipy
3040
pip install git+https://github.com/mapillary/inplace_abn.git@v1.0.11

0 commit comments

Comments
 (0)