mmdetection icon indicating copy to clipboard operation
mmdetection copied to clipboard

Dev 3.x update dockerfile

Open Nioolek opened this issue 2 years ago • 1 comments

Motivation

  • The pytorch version in dockerfile is 1.6.0, cuda version in dockerfile is 10.1,this should be updated. I updated pytorch to 1.9.0 and cuda to 11.1.
  • Fix bug of Public GPG key error while build the docker. More details can be seen in : https://github.com/NVIDIA/nvidia-docker/issues/1631
  • Chinese users maybe download slowly or even frequently interrupt during apt-get. So I add the Aliyun Mirror as an optional option.

I tested the docker can be built successfully and inference successfully. image

My environment:

  • Docker version 20.10.5
  • nvidia-docker
  • GPU: 2*A100

Modification

Modify:

  • docker/Dockerfile
  • docker/serve/Dockerfile
  • docs/zh_cn/get_started.md
  • docs/en/get_started.md

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

Nioolek avatar Sep 20 '22 13:09 Nioolek

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 20 '22 13:09 CLAassistant

Hi @Nioolek , Thanks for your kind PR. We plan to merge this PR. Before that, would you like to add some explanation above the added commands so that other developers could better understand its role, especially its necessity?

ZwwWayne avatar Sep 21 '22 05:09 ZwwWayne

Hi @Nioolek , Thanks for your kind PR. We plan to merge this PR. Before that, would you like to add some explanation above the added commands so that other developers could better understand its role, especially its necessity?

Hello, I added some explanations in Dockerfile. Please review it again.

Nioolek avatar Sep 21 '22 06:09 Nioolek

Hi @Nioolek Great! Since dev-3.x is updated, could you rebase your branch to the newest dev-3.x?

You can do that simply by first setting the pull strategy as rebase

git config --local --add pull.rebase true

Then you can pull the most recent dev-3.x by git pull [remote name] dev-3.x as usual. When git push after rebase, you might need to add --force option to ignore the conflict of branches.

ZwwWayne avatar Sep 28 '22 02:09 ZwwWayne

@Nioolek Please sync the lastest dev-3.x

hhaAndroid avatar Oct 10 '22 03:10 hhaAndroid

@Nioolek Please sync the lastest dev-3.x

I rebased my branch to dev-3.x

Nioolek avatar Oct 10 '22 03:10 Nioolek

Hi @Nioolek Thank you for your nice PR. I am just doing the same thing as this PR does.

By the way, I have tried your Dockerfile and got the following error.

root@c1611f2348d5:/mmdetection# python tools/train.py my_config.py
Traceback (most recent call last):
  File "tools/train.py", line 12, in <module>
    from mmdet.utils import register_all_modules
  File "/mmdetection/mmdet/__init__.py", line 23, in <module>
    f'MMEngine=={mmengine.__version__} is used but incompatible. ' \
AssertionError: MMEngine==0.2.0 is used but incompatible. Please install mmengine>=0.0.0, <0.2.0.

I think Dockerfile has to specify mmengine==0.1.0 to solve the version conflict. In actual, I succeeded in solving the error by the following modification.

RUN pip install openmim && \
    mim install "mmengine==0.1.0" "mmcv>=2.0.0rc1"

Could you consider integrating the modification above? Thanks.

Itto1992 avatar Oct 12 '22 05:10 Itto1992

Hi @Nioolek Thank you for your nice PR. I am just doing the same thing as this PR does.

By the way, I have tried your Dockerfile and got the following error.

root@c1611f2348d5:/mmdetection# python tools/train.py my_config.py
Traceback (most recent call last):
  File "tools/train.py", line 12, in <module>
    from mmdet.utils import register_all_modules
  File "/mmdetection/mmdet/__init__.py", line 23, in <module>
    f'MMEngine=={mmengine.__version__} is used but incompatible. ' \
AssertionError: MMEngine==0.2.0 is used but incompatible. Please install mmengine>=0.0.0, <0.2.0.

I think Dockerfile has to specify mmengine==0.1.0 to solve the version conflict. In actual, I succeeded in solving the error by the following modification.

RUN pip install openmim && \
    mim install "mmengine==0.1.0" "mmcv>=2.0.0rc1"

Could you consider integrating the modification above? Thanks.

Thank you for your suggestion. I update the Dockerfile. Now, the mmengine must use version 0.0.2.

Nioolek avatar Oct 19 '22 05:10 Nioolek