From b77088423bd8868f4b82a1e4589fd2753d1f1cad Mon Sep 17 00:00:00 2001 From: xiexinch Date: Mon, 12 Dec 2022 14:31:25 +0800 Subject: [PATCH 1/5] Add torch1.13 in CI --- .circleci/test.yml | 4 +-- .github/workflows/merge_stage_test.yml | 48 +++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index c8acb48293..414e3c4ced 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -154,8 +154,8 @@ workflows: - lint - build_cpu: name: maximum_version_cpu - torch: 1.12.1 - torchvision: 0.13.1 + torch: 1.13.0 + torchvision: 0.14.0 python: 3.9.0 requires: - minimum_version_cpu diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index b4a4a4424d..56676cde76 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: python-version: [3.7] - torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0] + torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.1, 1.13.0] include: - torch: 1.6.0 torchvision: 0.7.0 @@ -76,6 +76,10 @@ jobs: torchvision: 0.11.2 - torch: 1.11.0 torchvision: 0.12.0 + - torch: 1.12.1 + torchvision: 0.13.0 + - torch: 1.13.0 + torchvision: steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -166,6 +170,48 @@ jobs: run: | python setup.py check -m -s TORCH_CUDA_ARCH_LIST=7.0 pip install -e . + build_cu116: + runs-on: ubuntu-18.04 + container: + image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel + strategy: + matrix: + python-version: [3.7] + include: + - torch: 1.13.0 + cuda: 11.6 + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Upgrade pip + run: pip install pip --upgrade + - 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 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 mmseg dependencies + run: | + python -V + pip install -U openmim + pip install git+https://github.com/open-mmlab/mmengine.git + mim install 'mmcv>=2.0.0rc3' + pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x + pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + - name: Install unittest dependencies + run: pip install -r requirements/tests.txt -r requirements/optional.txt + - name: Build and install + run: | + python setup.py check -m -s + TORCH_CUDA_ARCH_LIST=7.0 pip install -e . build_windows: runs-on: ${{ matrix.os }} strategy: From 02030b104a62b990815e47ecca5fa402f7d5a392 Mon Sep 17 00:00:00 2001 From: xiexinch Date: Mon, 12 Dec 2022 15:26:40 +0800 Subject: [PATCH 2/5] use mim install mm packages --- .circleci/test.yml | 6 +++--- .github/workflows/pr_stage_test.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 414e3c4ced..700aeb839c 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -59,11 +59,11 @@ jobs: - run: name: Install mmseg dependencies command: | - pip install git+https://github.com/open-mmlab/mmengine.git@main + mim install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv>=2.0.0rc3' - pip install git+https://github.com/open-mmlab/mmclassification@dev-1.x - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install git+https://github.com/open-mmlab/mmclassification@dev-1.x + mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x pip install -r requirements/tests.txt -r requirements/optional.txt - run: name: Build and install diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index 302c4689f9..06f1f1cb7d 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -39,10 +39,10 @@ jobs: - name: Install other dependencies run: | pip install -U openmim - pip install git+https://github.com/open-mmlab/mmengine.git + mim install git+https://github.com/open-mmlab/mmengine.git mim install 'mmcv>=2.0.0rc3' - pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x + mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies run: pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install @@ -125,10 +125,10 @@ jobs: run: | python -V pip install -U openmim - pip install git+https://github.com/open-mmlab/mmengine.git + mim install git+https://github.com/open-mmlab/mmengine.git mim install 'mmcv>=2.0.0rc3' - pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x + mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies run: pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install From fdd1b95f932f08a3278af6025b40d33bb796c2c3 Mon Sep 17 00:00:00 2001 From: xiexinch Date: Mon, 12 Dec 2022 19:05:30 +0800 Subject: [PATCH 3/5] install all requirements --- .circleci/test.yml | 2 +- .github/workflows/pr_stage_test.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 700aeb839c..78629f659b 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -59,7 +59,7 @@ jobs: - run: name: Install mmseg dependencies command: | - mim install git+https://github.com/open-mmlab/mmengine.git@main + pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv>=2.0.0rc3' mim install git+https://github.com/open-mmlab/mmclassification@dev-1.x diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index 06f1f1cb7d..8bb7acdf27 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -44,7 +44,7 @@ jobs: mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements/tests.txt -r requirements/optional.txt + run: pip install -r requirements.txt - name: Build and install run: rm -rf .eggs && pip install -e . - name: Run unittests and generate coverage report @@ -97,7 +97,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements/tests.txt -r requirements/optional.txt + run: pip install -r requirements.txt - name: Build and install run: | python setup.py check -m -s @@ -130,7 +130,7 @@ jobs: mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements/tests.txt -r requirements/optional.txt + run: pip install -r requirements.txt - name: Build and install run: pip install -e . - name: Run unittests From 492313b1159daa71971f7ad696038a62fe9c2046 Mon Sep 17 00:00:00 2001 From: xiexinch Date: Tue, 13 Dec 2022 10:18:12 +0800 Subject: [PATCH 4/5] install wheel --- .circleci/test.yml | 4 ++-- .github/workflows/merge_stage_test.yml | 20 ++++++++++++----- .github/workflows/pr_stage_test.yml | 30 +++++++++++++++----------- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 78629f659b..414e3c4ced 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -62,8 +62,8 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv>=2.0.0rc3' - mim install git+https://github.com/open-mmlab/mmclassification@dev-1.x - mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + pip install git+https://github.com/open-mmlab/mmclassification@dev-1.x + pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x pip install -r requirements/tests.txt -r requirements/optional.txt - run: name: Build and install diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index 56676cde76..c167f793f1 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -33,7 +33,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Install Pillow run: pip install Pillow==6.2.2 if: ${{matrix.torchvision == '0.4.2'}} @@ -87,7 +89,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Install Pillow run: pip install Pillow==6.2.2 - name: Install PyTorch @@ -145,7 +149,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -187,7 +193,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -226,7 +234,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: python -m pip install pip --upgrade + run: | + python -m pip install pip --upgrade + pip install wheel - name: Install OpenCV run: pip install opencv-python>=3 - name: Install PyTorch diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index 8bb7acdf27..6e35b668bd 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -30,7 +30,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Install Pillow run: pip install Pillow==6.2.2 if: ${{matrix.torchvision == '0.4.2'}} @@ -39,12 +41,12 @@ jobs: - name: Install other dependencies run: | pip install -U openmim - mim install git+https://github.com/open-mmlab/mmengine.git + pip install git+https://github.com/open-mmlab/mmengine.git mim install 'mmcv>=2.0.0rc3' - mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x - mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x + pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements.txt + run: pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install run: rm -rf .eggs && pip install -e . - name: Run unittests and generate coverage report @@ -76,7 +78,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: | + pip install pip --upgrade + pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -97,7 +101,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements.txt + run: pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install run: | python setup.py check -m -s @@ -116,7 +120,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: python -m pip install pip --upgrade + run: | + python -m pip install pip --upgrade + pip install wheel - name: Install OpenCV run: pip install opencv-python>=3 - name: Install PyTorch @@ -125,12 +131,12 @@ jobs: run: | python -V pip install -U openmim - mim install git+https://github.com/open-mmlab/mmengine.git + pip install git+https://github.com/open-mmlab/mmengine.git mim install 'mmcv>=2.0.0rc3' - mim install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x - mim install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x + pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x - name: Install unittest dependencies - run: pip install -r requirements.txt + run: pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install run: pip install -e . - name: Run unittests From 815b24ea22fd75f600b05bd512cb969ef65b032d Mon Sep 17 00:00:00 2001 From: xiexinch Date: Tue, 13 Dec 2022 11:47:02 +0800 Subject: [PATCH 5/5] add ref --- .github/workflows/pr_stage_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index 6e35b668bd..f468f882b2 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -32,6 +32,7 @@ jobs: - name: Upgrade pip run: | pip install pip --upgrade + # Install wheel for source distribution build. https://github.com/pypa/pip/blob/main/src/pip/_internal/wheel_builder.py#L94 pip install wheel - name: Install Pillow run: pip install Pillow==6.2.2