3535 strategy :
3636 matrix :
3737 python-version : [3.7]
38- torch : [1.3.0, 1. 5.0, 1.6.0, 1.7.0, 1.8.0]
38+ torch : [1.5.0, 1.6.0, 1.7.0, 1.8.0]
3939 include :
40- - torch : 1.3.0
41- torchvision : 0.4.1
4240 - torch : 1.5.0
4341 torchvision : 0.6.0
4442 - torch : 1.6.0
@@ -74,20 +72,15 @@ jobs:
7472 coverage xml
7573 coverage report -m
7674
77- build_cuda :
75+ build_cuda101 :
7876 runs-on : ubuntu-18.04
79-
80- env :
81- CUDA : 10.1.105-1
82- CUDA_SHORT : 10.1
83- UBUNTU_VERSION : ubuntu1804
77+ container :
78+ image : pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
8479 strategy :
8580 matrix :
8681 python-version : [3.7]
87- torch : [1.3.0, 1. 5.0, 1.6.0, 1.7.0, 1.8.0]
82+ torch : [1.5.0, 1.6.0, 1.7.0, 1.8.0]
8883 include :
89- - torch : 1.3.0
90- torchvision : 0.4.1
9184 - torch : 1.5.0
9285 torchvision : 0.6.0
9386 - torch : 1.6.0
@@ -96,78 +89,105 @@ jobs:
9689 torchvision : 0.8.1
9790 - torch : 1.8.0
9891 torchvision : 0.9.0
99- - python-version : 3.6
100- torch : 1.7.0
101- torchvision : 0.8.1
102- - python-version : 3.8
103- torch : 1.7.0
104- torchvision : 0.8.1
105- - python-version : 3.8
106- torch : 1.8.0
107- torchvision : 0.9.0
108- - python-version : 3.9
109- torch : 1.8.0
110- torchvision : 0.9.0
11192
11293 steps :
11394 - uses : actions/checkout@v2
11495 - name : Set up Python ${{ matrix.python-version }}
11596 uses : actions/setup-python@v2
11697 with :
11798 python-version : ${{ matrix.python-version }}
118- - name : Upgrade pip
119- run : pip install pip --upgrade
120- - name : Install CUDA
99+ - name : Install system dependencies
121100 run : |
122- export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
123- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
124- sudo dpkg -i ${INSTALLER}
125- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
126- sudo apt-key add 7fa2af80.pub
127- sudo apt update -qq
128- sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
129- sudo apt clean
130- export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
131- export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
132- export PATH=${CUDA_HOME}/bin:${PATH}
133- sudo apt-get install -y ninja-build
101+ apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg python${{matrix.python-version}}-dev
102+ apt-get clean
103+ rm -rf /var/lib/apt/lists/*
134104 - name : Install dependencies for compiling onnx when python=3.9
135- run : pip install protobuf && sudo apt-get install libprotobuf-dev protobuf-compiler
105+ run : python -m pip install protobuf && apt-get install -y libprotobuf-dev protobuf-compiler
136106 if : ${{matrix.python-version == '3.9'}}
137107 - name : Install Pillow
138- run : pip install Pillow==6.2.2
108+ run : python -m pip install Pillow==6.2.2
139109 if : ${{matrix.torchvision < 0.5}}
140- - name : Install TurboJpeg lib
141- run : sudo apt-get install -y libturbojpeg
142110 - name : Install PyTorch
111+ run : python -m pip install torch==${{matrix.torch}}+cu101 torchvision==${{matrix.torchvision}}+cu101 -f https://download.pytorch.org/whl/torch_stable.html
112+ - name : Install mmpose dependencies
143113 run : |
144- if [ ${{matrix.torch}} == '1.3.0' ]
145- then
146- pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
147- else
148- pip install torch==${{matrix.torch}}+cu101 torchvision==${{matrix.torchvision}}+cu101 -f https://download.pytorch.org/whl/torch_stable.html
149- fi
150- - name : Install MMCV
114+ python -V
115+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch}}/index.html
116+ python -m pip install -r requirements.txt
117+ python -c 'import mmcv; print(mmcv.__version__)'
118+ - name : Build and install
119+ run : |
120+ rm -rf .eggs
121+ python setup.py check -m -s
122+ TORCH_CUDA_ARCH_LIST=7.0 python -m pip install .
123+ - name : Run unittests and generate coverage report
151124 run : |
152- pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.torch}}/index.html
125+ coverage run --branch --source mmpose -m pytest tests/
126+ coverage xml
127+ coverage report -m
128+ - name : Upload coverage to Codecov
129+ uses : codecov/codecov-action@v2
130+ with :
131+ files : ./coverage.xml
132+ flags : unittests
133+ env_vars : OS,PYTHON
134+ name : codecov-umbrella
135+ fail_ci_if_error : false
136+
137+ build_cuda102 :
138+ runs-on : ubuntu-18.04
139+ container :
140+ image : pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel
141+ strategy :
142+ matrix :
143+ python-version : [3.6, 3.7, 3.8, 3.9-dev]
144+ torch : [1.9.0]
145+ include :
146+ - torch : 1.9.0
147+ torchvision : 0.10.0
148+
149+ steps :
150+ - uses : actions/checkout@v2
151+ - name : Set up Python ${{ matrix.python-version }}
152+ uses : actions/setup-python@v2
153+ with :
154+ python-version : ${{ matrix.python-version }}
155+ - name : Install python-dev
156+ run : apt-get update && apt-get install -y python${{matrix.python-version}}-dev
157+ if : ${{matrix.python-version != '3.9-dev'}}
158+ - name : Install system dependencies
159+ run : |
160+ apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg
161+ apt-get clean
162+ rm -rf /var/lib/apt/lists/*
163+ - name : Install dependencies for compiling onnx when python=3.9
164+ run : python -m pip install protobuf && apt-get update && apt-get -y install libprotobuf-dev protobuf-compiler cmake
165+ if : ${{matrix.python-version == '3.9-dev'}}
166+ - name : Install Pillow
167+ run : python -m pip install Pillow==6.2.2
168+ if : ${{matrix.torchvision < 0.5}}
169+ - name : Install PyTorch
170+ run : python -m pip install torch==${{matrix.torch}}+cu102 torchvision==${{matrix.torchvision}}+cu102 -f https://download.pytorch.org/whl/torch_stable.html
171+ - name : Install mmpose dependencies
172+ run : |
173+ python -V
174+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/${{matrix.torch}}/index.html
175+ python -m pip install -r requirements.txt
153176 python -c 'import mmcv; print(mmcv.__version__)'
154- - name : Install other dependencies
155- run : pip install -r requirements.txt
156177 - name : Build and install
157178 run : |
158179 rm -rf .eggs
159180 python setup.py check -m -s
160- TORCH_CUDA_ARCH_LIST=7.0 pip install .
181+ TORCH_CUDA_ARCH_LIST=7.0 python -m pip install .
161182 - name : Run unittests and generate coverage report
162183 run : |
163184 coverage run --branch --source mmpose -m pytest tests/
164185 coverage xml
165186 coverage report -m
166187 - name : Upload coverage to Codecov
167- if : ${{matrix.torch == '1.6.0+cu101' && matrix.python-version == '3.7'}}
168- 188+ uses : codecov/codecov-action@v2
169189 with :
170- file : ./coverage.xml
190+ files : ./coverage.xml
171191 flags : unittests
172192 env_vars : OS,PYTHON
173193 name : codecov-umbrella
0 commit comments