This commit is contained in:
BIGWangYuDong 2022-05-18 21:47:21 +08:00
parent 3f3b6b4fd0
commit a4d8ff024b

View File

@ -21,7 +21,7 @@ concurrency:
jobs:
build_cpu:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.7]
@ -70,12 +70,10 @@ jobs:
coverage report -m
build_cuda:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env:
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
UBUNTU_VERSION: ubuntu1804
container:
image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
strategy:
matrix:
python-version: [3.7]
@ -87,21 +85,21 @@ jobs:
]
include:
- torch: 1.5.1+cu101
torch_version: torch1.5
torch_version: torch1.5.1
torchvision: 0.6.1+cu101
mmcv: 1.5.0
mmcv: 1.5
- torch: 1.6.0+cu101
torch_version: torch1.6
torch_version: torch1.6.0
torchvision: 0.7.0+cu101
mmcv: 1.6.0
mmcv: 1.6
- torch: 1.7.0+cu101
torch_version: torch1.7
torch_version: torch1.7.0
torchvision: 0.8.1+cu101
mmcv: 1.7.0
mmcv: 1.7
- torch: 1.8.0+cu101
torch_version: torch1.8
torch_version: torch1.8.0
torchvision: 0.9.0+cu101
mmcv: 1.8.0
mmcv: 1.8
steps:
- uses: actions/checkout@v2
@ -109,24 +107,16 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install CUDA
- name: Install system dependencies
run: |
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${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 clean
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}
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 python${{matrix.python-version}}-dev
apt-get clean
rm -rf /var/lib/apt/lists/*
- name: Install Pillow
run: pip install Pillow==6.2.2
run: python -m 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
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMCV
run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.mmcv}}/index.html