Skip to content

Commit bd725fd

Browse files
committed
add torch1.13 in ci
1 parent 180ad08 commit bd725fd

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,71 @@ jobs:
222222
name: codecov-umbrella
223223
fail_ci_if_error: false
224224

225+
build_cu116:
226+
runs-on: ubuntu-18.04
227+
container:
228+
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
229+
env:
230+
FORCE_CUDA: 1
231+
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
232+
strategy:
233+
matrix:
234+
python-version: ['3.10']
235+
torch: [1.13.0+cu116]
236+
include:
237+
- torch: 1.13.0+cu116
238+
torchvision: 0.14.0+cu116
239+
steps:
240+
- uses: actions/checkout@v2
241+
- name: Set up Python ${{ matrix.python-version }}
242+
uses: actions/setup-python@v2
243+
with:
244+
python-version: ${{ matrix.python-version }}
245+
- name: Fetch GPG keys
246+
run: |
247+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
248+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
249+
- name: Add PPA
250+
run: |
251+
apt-get update && apt-get install -y software-properties-common
252+
add-apt-repository -y ppa:deadsnakes/ppa
253+
- name: Install python-dev
254+
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python${{matrix.python-version}}-dev
255+
- name: python -m Install PyTorch
256+
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
257+
- name: Install system dependencies
258+
run: apt-get update && apt-get install -y ffmpeg libturbojpeg ninja-build
259+
- name: Install Pillow
260+
run: python -m pip install Pillow==6.2.2
261+
if: ${{matrix.torchvision < 0.5}}
262+
- name: Install PyTorch
263+
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
264+
- name: Install mmseg dependencies
265+
run: |
266+
python -V
267+
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/${{matrix.torch_version}}/index.html
268+
python -m pip install -r requirements.txt
269+
python -c 'import mmcv; print(mmcv.__version__)'
270+
- name: Build and install
271+
run: |
272+
rm -rf .eggs
273+
python setup.py check -m -s
274+
TORCH_CUDA_ARCH_LIST=7.0 pip install .
275+
- name: Run unittests and generate coverage report
276+
run: |
277+
python -m pip install timm
278+
coverage run --branch --source mmseg -m pytest tests/
279+
coverage xml
280+
coverage report -m
281+
- name: Upload coverage to Codecov
282+
uses: codecov/codecov-action@v2
283+
with:
284+
files: ./coverage.xml
285+
flags: unittests
286+
env_vars: OS,PYTHON
287+
name: codecov-umbrella
288+
fail_ci_if_error: false
289+
225290
test_windows:
226291
runs-on: ${{ matrix.os }}
227292
strategy:

0 commit comments

Comments
 (0)