Unverified Commit 407de2c1 authored by Xiang Xu's avatar Xiang Xu Committed by GitHub
Browse files

[CI] Fix CI for deprecation of ubuntu 18.04 (#2397)

* fix ci

* fix ci
parent 6d9be309
......@@ -26,6 +26,7 @@ jobs:
command: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 90 mmdet3d
build_cpu:
parameters:
# The python version must match available image tags in
......@@ -49,32 +50,37 @@ jobs:
- run:
name: Configure Python & pip
command: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install typing-extensions --upgrade
pip install --upgrade pip
pip install wheel
- run:
name: Install PyTorch
command: |
python -V
python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- when:
condition:
equal: ["3.9.0", << parameters.python >>]
steps:
- run: pip install "protobuf <= 3.20.1" && sudo apt-get update && sudo apt-get -y install libprotobuf-dev protobuf-compiler cmake
- run:
name: Install mmdet3d dependencies
command: |
python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main
python -m pip install -U openmim
python -m mim install 'mmcv >= 2.0.0rc1'
python -m pip install git+ssh://git@github.com/open-mmlab/mmdetection.git@dev-3.x
python -m pip install -r requirements.txt
pip install -U openmim
mim install 'mmcv >= 2.0.0rc1'
pip install git+ssh://git@github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements.txt
- run:
name: Build and install
command: |
python -m pip install -e .
pip install -e .
- run:
name: Run unittests
command: |
python -m coverage run --branch --source mmdet3d -m pytest tests/
python -m coverage xml
python -m coverage report -m
build_cuda:
parameters:
torch:
......@@ -102,6 +108,7 @@ jobs:
command: |
docker build .circleci/docker -t mmdet3d:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
docker run --gpus all -t -d -v /home/circleci/project:/mmdetection3d -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmdetection:/mmdetection -w /mmdetection3d --name mmdet3d mmdet3d:gpu
docker exec mmdet3d apt-get install -y git
- run:
name: Install mmdet3d dependencies
command: |
......@@ -118,6 +125,7 @@ jobs:
name: Run unittests
command: |
docker exec mmdet3d python -m pytest tests/
workflows:
pr_stage_lint:
when: << pipeline.parameters.lint_only >>
......@@ -142,7 +150,7 @@ workflows:
name: minimum_version_cpu
torch: 1.6.0
torchvision: 0.7.0
python: 3.7.4
python: 3.7.4 # The lowest python 3.7.x version available on CircleCI images
requires:
- lint
- build_cpu:
......@@ -171,8 +179,6 @@ workflows:
- build_cuda:
name: minimum_version_gpu
torch: 1.6.0
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "10.1"
filters:
branches:
......
name: deploy
on: push
......@@ -9,7 +8,7 @@ concurrency:
jobs:
build-n-publish:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
......@@ -19,8 +18,10 @@ jobs:
python-version: 3.7
- name: Install torch
run: pip install torch
- name: Install wheel
run: pip install wheel
- name: Build MMDet3D
run: python setup.py sdist
run: python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
run: |
pip install twine
......
......@@ -24,4 +24,4 @@ jobs:
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 90 mmdet3d
interrogate -v --ignore-init-method --ignore-magic --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 90 mmdet3d
......@@ -18,7 +18,7 @@ concurrency:
jobs:
build_cpu_py:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
......@@ -27,15 +27,15 @@ jobs:
- torch: 1.8.1
torchvision: 0.9.1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install MMEngine
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install MMCV
......@@ -53,8 +53,9 @@ jobs:
coverage run --branch --source mmdet3d -m pytest tests/
coverage xml
coverage report -m
build_cpu_pt:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
......@@ -72,20 +73,23 @@ jobs:
torchvision: 0.11.2
- torch: 1.11.0
torchvision: 0.12.0
- torch: 1.12.1
torchvision: 0.13.1
- torch: 1.12.0
torchvision: 0.13.0
- torch: 1.13.0
torchvision: 0.14.0
- torch: 2.0.0
torchvision: 0.15.1
python-version: 3.8
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install MMEngine
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install MMCV
......@@ -115,7 +119,7 @@ jobs:
fail_ci_if_error: false
build_cu102:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
strategy:
......@@ -125,9 +129,9 @@ jobs:
- torch: 1.8.1
cuda: 10.2
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
......@@ -136,14 +140,8 @@ jobs:
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install Python-dev
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
if: ${{matrix.python-version != 3.9}}
- name: Install system dependencies
run: |
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
- name: Install PyTorch
run: python -m pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html
run: apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
- name: Install mmdet3d dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
......@@ -152,28 +150,34 @@ jobs:
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
- name: Build and install
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
python setup.py check -m -s
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
build_windows:
runs-on: ${{ matrix.os }}
coverage run --branch --source mmdet3d -m pytest tests/
coverage xml
coverage report -m
build_cu116:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
strategy:
matrix:
os: [windows-2022]
python: [3.7]
platform: [cpu, cu111]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install lmdb
run: pip install lmdb
- name: Install PyTorch
run: pip install torch==1.8.1+${{matrix.platform}} torchvision==0.9.1+${{matrix.platform}} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install mmdet3d dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
......@@ -182,42 +186,41 @@ jobs:
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
- name: Build and install
run: |
pip install -e .
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
pytest tests/
build_cu116:
runs-on: ubuntu-18.04
container:
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
coverage run --branch --source mmcv -m pytest tests
coverage xml
coverage report -m
build_windows:
runs-on: windows-2022
strategy:
matrix:
python-version: [ 3.7 ]
python-version: [3.7]
platform: [cpu, cu111]
torch: [1.8.1]
torchvision: [0.9.1]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Fetch GPG keys
- name: Install lmdb
run: pip install lmdb
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+${{matrix.platform}} torchvision==${{matrix.torchvision}}+${{matrix.platform}} -f https://download.pytorch.org/whl/${{matrix.platform}}/torch_stable.html
- name: Install mmdet3d dependencies
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/tests.txt
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv >= 2.0.0rc1'
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
- name: Build and install
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests
coverage xml
coverage report -m
run: pytest tests/
......@@ -16,7 +16,7 @@ concurrency:
jobs:
build_cpu:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
......@@ -24,15 +24,15 @@ jobs:
- torch: 1.8.1
torchvision: 0.9.1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install MMEngine
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install MMCV
......@@ -61,16 +61,16 @@ jobs:
fail_ci_if_error: false
build_cu102:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
strategy:
matrix:
python-version: [3.8]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
......@@ -79,15 +79,8 @@ jobs:
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install Python-dev
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
if: ${{matrix.python-version != 3.9}}
- name: Install system dependencies
run: |
apt-get update
apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev
- name: Install PyTorch
run: python -m pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html
run: apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
- name: Install mmdet3d dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
......@@ -96,28 +89,33 @@ jobs:
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
- name: Build and install
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
python setup.py check -m -s
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
coverage run --branch --source mmdet3d -m pytest tests/
coverage xml
coverage report -m
build_windows:
runs-on: ${{ matrix.os }}
runs-on: windows-2022
strategy:
matrix:
os: [windows-2022]
python: [3.7]
python-version: [3.7]
platform: [cpu, cu111]
torch: [1.8.1]
torchvision: [0.9.1]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install pip --upgrade
- name: Install lmdb
run: pip install lmdb
- name: Install PyTorch
run: pip install torch==1.8.1+${{matrix.platform}} torchvision==0.9.1+${{matrix.platform}} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
run: pip install torch==${{matrix.torch}}+${{matrix.platform}} torchvision==${{matrix.torchvision}}+${{matrix.platform}} -f https://download.pytorch.org/whl/${{matrix.platform}}/torch_stable.html
- name: Install mmdet3d dependencies
run: |
pip install git+https://github.com/open-mmlab/mmengine.git@main
......@@ -126,8 +124,6 @@ jobs:
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
- name: Build and install
run: |
pip install -e .
run: pip install -e .
- name: Run unittests and generate coverage report
run: |
pytest tests/
run: pytest tests/
......@@ -17,7 +17,7 @@ concurrency:
jobs:
build_cpu:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
......@@ -27,15 +27,15 @@ jobs:
torch_version: torch1.8
torchvision: 0.9.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install openmim
run: pip install openmim
- name: Build and install
......
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