Unverified Commit 588b37eb authored by Tai-Wang's avatar Tai-Wang Committed by GitHub
Browse files

[Enhancement] Use docker to accelerate CI (#971)

parent 26ab7ff2
...@@ -29,12 +29,12 @@ jobs: ...@@ -29,12 +29,12 @@ jobs:
build: build:
env: env:
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
UBUNTU_VERSION: ubuntu1804
FORCE_CUDA: 1 FORCE_CUDA: 1
CUDA_ARCH: ${{matrix.cuda_arch}} CUDA_ARCH: ${{matrix.cuda_arch}}
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
container:
image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
strategy: strategy:
matrix: matrix:
python-version: [3.6, 3.7] python-version: [3.6, 3.7]
...@@ -43,21 +43,21 @@ jobs: ...@@ -43,21 +43,21 @@ jobs:
- torch: 1.5.0+cu101 - torch: 1.5.0+cu101
torch_version: torch1.5.0 torch_version: torch1.5.0
torchvision: 0.6.0+cu101 torchvision: 0.6.0+cu101
mmcv: 1.5.0+cu101 mmcv_link: "torch1.5.0"
cuda_arch: "7.0" cuda_arch: "7.0"
- torch: 1.6.0+cu101 - torch: 1.6.0+cu101
torch_version: torch1.6.0 torch_version: torch1.6.0
mmcv: 1.6.0+cu101 mmcv_link: "torch1.6.0"
torchvision: 0.7.0+cu101 torchvision: 0.7.0+cu101
cuda_arch: "7.0" cuda_arch: "7.0"
- torch: 1.7.0+cu101 - torch: 1.7.0+cu101
torch_version: torch1.7.0 torch_version: torch1.7.0
mmcv: 1.7.0+cu101 mmcv_link: "torch1.7.0"
torchvision: 0.8.1+cu101 torchvision: 0.8.1+cu101
cuda_arch: "7.0" cuda_arch: "7.0"
- torch: 1.8.0+cu101 - torch: 1.8.0+cu101
torch_version: torch1.8.0 torch_version: torch1.8.0
mmcv: 1.8.0+cu101 mmcv_link: "torch1.8.0"
torchvision: 0.9.0+cu101 torchvision: 0.9.0+cu101
cuda_arch: "7.0" cuda_arch: "7.0"
...@@ -67,33 +67,22 @@ jobs: ...@@ -67,33 +67,22 @@ jobs:
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install CUDA - name: Install system dependencies
run: | run: |
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb apt-get update && apt-get install -y ffmpeg libsm6 git ninja-build libglib2.0-0 libsm6 libxrender-dev python${{matrix.python-version}}-dev
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER} apt-get clean
sudo dpkg -i ${INSTALLER} rm -rf /var/lib/apt/lists/*
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 clean
sudo cp /usr/local/cuda-10.2/include/* /usr/local/cuda/include
sudo cp -r /usr/local/cuda-10.2/lib64/* /usr/local/cuda/lib64/
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
export PATH=${CUDA_HOME}/bin:${PATH}
sudo apt-get install -y ninja-build
- name: Install Pillow - name: Install Pillow
run: pip install Pillow==6.2.2 run: python -m pip install Pillow==6.2.2
if: ${{matrix.torchvision < 0.5}} if: ${{matrix.torchvision < 0.5}}
- name: Install PyTorch - name: Install PyTorch
run: pip install numpy==1.19.5 torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html run: python -m pip install numpy==1.19.5 torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install mmdet3d dependencies - name: Install mmdet3d dependencies
run: | run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch_version}}/index.html python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch_version}}/index.html
pip install mmdet==2.14.0 python -m pip install mmdet==2.14.0
pip install mmsegmentation==0.14.1 python -m pip install mmsegmentation==0.14.1
pip install -r requirements.txt python -m pip install -r requirements.txt
- name: Build and install - name: Build and install
run: | run: |
rm -rf .eggs rm -rf .eggs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment