diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 877b7b668..3abc555ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -60,17 +72,19 @@ 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}} @@ -78,8 +92,9 @@ jobs: 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 diff --git a/setup.py b/setup.py index 44d72d6d5..0bf991b40 100644 --- a/setup.py +++ b/setup.py @@ -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',