Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Upgrade CI for PyTorch1.9 #115

Merged
merged 4 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Upgrade CI for PyTorch1.9
  • Loading branch information
yangyifei authored and yangyifei committed Sep 12, 2021
commit f748d50d3bf12dee1f17fc487c1fe8a4f053a785
29 changes: 22 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,43 @@ jobs:
runs-on: ubuntu-18.04

env:
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
UBUNTU_VERSION: ubuntu1804
strategy:
matrix:
python-version: [3.7]
torch: [1.5.1+cu101, 1.7.0+cu101, 1.8.0+cu101]
torch: [1.5.1+cu101, 1.7.0+cu101, 1.8.0+cu101, 1.9.0+cu102]
include:
- torch: 1.5.1+cu101
torch_version: torch1.5.1
torchvision: 0.6.1+cu101
mmcv: "latest+torch1.5.0+cu101"
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
- torch: 1.7.0+cu101
torch_version: torch1.7.0
torchvision: 0.8.1+cu101
mmcv: "latest+torch1.7.0+cu101"
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
- torch: 1.8.0+cu101
torch_version: torch1.8.0
torchvision: 0.9.0+cu101
mmcv: "latest+torch1.8.0+cu101"
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
- torch: 1.8.0+cu101
torch_version: torch1.8.0
torchvision: 0.9.0+cu101
mmcv: "latest+torch1.8.0+cu101"
python-version: 3.9
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
- torch: 1.9.0+cu102
torch_version: torch1.9.0
torchvision: 0.10.0+cu102
mmcv: "latest+torch1.9.0+cu102"
CUDA: 10.2.89-1
CUDA_SHORT: 10-2

steps:
- uses: actions/checkout@v2
Expand All @@ -60,26 +72,29 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install CUDA
run: |
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${{matrix.CUDA}}_amd64.deb
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
sudo dpkg -i ${INSTALLER}
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
sudo apt-key add 7fa2af80.pub
sudo apt update -qq
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
sudo apt install -y cuda-${{matrix.CUDA_SHORT}} cuda-cufft-dev-${{matrix.CUDA_SHORT}}
sudo apt clean
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
export CUDA_HOME=/usr/local/cuda-${{matrix.CUDA_SHORT}}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
export PATH=${CUDA_HOME}/bin:${PATH}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install Pillow
run: pip install Pillow==6.2.2
if: ${{matrix.torchvision < 0.5}}
- name: Install PyTorch
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install mmgen dependencies
run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch_version}}/index.html
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${CUDA_SHORT/-/}/${{matrix.torch_version}}/index.html
pip install -r requirements.txt
python -c 'import mmcv; print(mmcv.__version__)'
- name: Build and install
run: |
rm -rf .eggs
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def make_cuda_ext(name, module, sources, sources_cuda=[]):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
url='https://github.com/open-mmlab/mmgen',
author='MMGeneration Contributors',
Expand Down