From 81fc48f2b235c0dc9316c3546e795284c3b90a4d Mon Sep 17 00:00:00 2001 From: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com> Date: Fri, 14 Oct 2022 15:03:24 +0800 Subject: [PATCH] [Fix] Fix mmengine ci (#1192) * try fix ci * fix ci * fix ci * fix circleci * fix ocr * fix mmengine version * install from github * update * update ci Co-authored-by: RunningLeon --- .circleci/docker/Dockerfile | 3 +-- .circleci/test.yml | 4 +--- .github/workflows/backend-ncnn.yml | 4 ++-- .github/workflows/backend-ort.yml | 5 ++--- .github/workflows/backend-pplnn.yml | 4 ++-- .github/workflows/backend-torchscript.yml | 1 + .github/workflows/build.yml | 3 --- requirements/codebases.txt | 8 ++++---- 8 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.circleci/docker/Dockerfile b/.circleci/docker/Dockerfile index 1ab3850bd..1e58427f7 100644 --- a/.circleci/docker/Dockerfile +++ b/.circleci/docker/Dockerfile @@ -26,9 +26,8 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini RUN /opt/conda/bin/conda install pytorch==${TORCH_VERSION} torchvision==${TORCHVISION_VERSION} cudatoolkit=${CUDA} -c pytorch -c conda-forge ENV PATH /opt/conda/bin:$PATH -### install mim, mmengine, mmcv +### install mim, mmcv RUN /opt/conda/bin/pip install openmim &&\ - mim install mmengine &&\ mim install 'mmcv>=2.0.0rc1' WORKDIR /workspace diff --git a/.circleci/test.yml b/.circleci/test.yml index 8b737959c..cca08a194 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -68,7 +68,7 @@ commands: name: Install mmcv command: | python -m pip install opencv-python==4.5.4.60 openmim - python -m mim install mmengine "mmcv>=2.0.0rc1" + python -m mim install "mmcv>=2.0.0rc1" install_mmdeploy: description: "Install MMDeploy" steps: @@ -83,8 +83,6 @@ commands: name: Install requirements command: | cd mmdeploy - git clone --depth 1 --branch 1.x https://github.com/open-mmlab/mmediting.git ../mmedit - python -m pip install ../mmedit python -m mim install -r requirements/codebases.txt python -m pip install -r requirements/tests.txt python -m pip install -r requirements/runtime.txt diff --git a/.github/workflows/backend-ncnn.yml b/.github/workflows/backend-ncnn.yml index 7cf75022c..884c830bc 100644 --- a/.github/workflows/backend-ncnn.yml +++ b/.github/workflows/backend-ncnn.yml @@ -76,7 +76,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install mmdeploy run: | - python tools/scripts/build_ubuntu_x64_ncnn.py python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu - python -m pip install mmcv-lite mmengine + python -m pip install mmcv-lite + python tools/scripts/build_ubuntu_x64_ncnn.py python -c 'import mmdeploy.apis.ncnn as ncnn_api; assert ncnn_api.is_available() and ncnn_api.is_custom_ops_available()' diff --git a/.github/workflows/backend-ort.yml b/.github/workflows/backend-ort.yml index 23b436fbd..ec8dcc589 100644 --- a/.github/workflows/backend-ort.yml +++ b/.github/workflows/backend-ort.yml @@ -33,13 +33,12 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install mmdeploy run: | - python tools/scripts/build_ubuntu_x64_ort.py python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu - python -m pip install mmcv-lite mmengine + python -m pip install mmcv-lite openmim + python tools/scripts/build_ubuntu_x64_ort.py python -c 'import mmdeploy.apis.onnxruntime as ort_api; assert ort_api.is_available() and ort_api.is_custom_ops_available()' - name: test mmcls full pipeline run: | - python -m pip install openmim python -m mim install $(cat requirements/codebases.txt | grep mmcls) export MMDEPLOY_DIR=$(pwd) export ONNXRUNTIME_DIR=$MMDEPLOY_DIR/../mmdeploy-dep/onnxruntime-linux-x64-1.8.1 diff --git a/.github/workflows/backend-pplnn.yml b/.github/workflows/backend-pplnn.yml index c25497de0..a6cda4093 100644 --- a/.github/workflows/backend-pplnn.yml +++ b/.github/workflows/backend-pplnn.yml @@ -33,7 +33,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install mmdeploy run: | - python tools/scripts/build_ubuntu_x64_pplnn.py python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu - python -m pip install mmcv-lite mmengine + python -m pip install mmcv-lite + python tools/scripts/build_ubuntu_x64_pplnn.py python -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()' diff --git a/.github/workflows/backend-torchscript.yml b/.github/workflows/backend-torchscript.yml index d52f372be..2cc149e74 100644 --- a/.github/workflows/backend-torchscript.yml +++ b/.github/workflows/backend-torchscript.yml @@ -33,4 +33,5 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install mmdeploy run: | + python -m pip install mmcv-lite python tools/scripts/build_ubuntu_x64_torchscript.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dcac68b6..dfdf7e59c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,6 @@ jobs: python -m pip install openmim python -m pip install -r requirements.txt -r requirements/backends.txt python -m mim install "mmcv>=2.0.0rc1" - git clone --depth 1 --branch 1.x https://github.com/open-mmlab/mmediting.git ../mmedit && python -m pip install ../mmedit python -m mim install -r requirements/codebases.txt python -m pip install -U numpy python -m pip list @@ -125,7 +124,6 @@ jobs: python -m pip install openmim python -m pip install -r requirements.txt -r requirements/backends.txt python -m mim install "mmcv>=2.0.0rc1" - git clone --depth 1 --branch 1.x https://github.com/open-mmlab/mmediting.git ../mmedit && python -m pip install ../mmedit CFLAGS=$CFLAGS python -m mim install -r requirements/codebases.txt python -m pip install -U pycuda numpy python -m pip list @@ -174,7 +172,6 @@ jobs: python -m pip install openmim python -m pip install -r requirements.txt -r requirements/backends.txt python -m mim install "mmcv>=2.0.0rc1" - git clone --depth 1 --branch 1.x https://github.com/open-mmlab/mmediting.git ../mmedit && python -m pip install ../mmedit python -m mim install -r requirements/codebases.txt python -m pip install -U pycuda numpy python -m pip list diff --git a/requirements/codebases.txt b/requirements/codebases.txt index 055c52233..035febdb1 100644 --- a/requirements/codebases.txt +++ b/requirements/codebases.txt @@ -1,6 +1,6 @@ -mmcls>=1.0.0rc0 -mmdet>=3.0.0rc0 -mmedit==1.0.0rc1 -mmocr>=1.0.0rc0 +mmcls>=1.0.0rc2 +mmdet @ git+https://github.com/open-mmlab/mmdetection.git@dev-3.x +mmedit @ git+https://github.com/open-mmlab/mmediting.git@1.x +mmocr @ git+https://github.com/open-mmlab/mmocr.git@dev-1.x mmpose>=1.0.0b0 mmsegmentation>=1.0.0rc0