Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 3.x update dockerfile #8845

Merged
merged 6 commits into from
Oct 20, 2022

Conversation

Nioolek
Copy link
Contributor

@Nioolek Nioolek commented Sep 20, 2022

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.

@CLAassistant
Copy link

CLAassistant commented Sep 20, 2022

CLA assistant check
All committers have signed the CLA.

@Nioolek Nioolek changed the base branch from master to dev-3.x September 20, 2022 13:45
@ZwwWayne
Copy link
Collaborator

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 ZwwWayne added this to the 3.0.0rc1 milestone Sep 21, 2022
@Nioolek
Copy link
Contributor Author

Nioolek commented Sep 21, 2022

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.

@ZwwWayne
Copy link
Collaborator

ZwwWayne commented Sep 28, 2022

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 ZwwWayne modified the milestones: 3.0.0rc1, 3.0.0rc2 Sep 28, 2022
@hhaAndroid
Copy link
Collaborator

@Nioolek Please sync the lastest dev-3.x

@Nioolek
Copy link
Contributor Author

Nioolek commented Oct 10, 2022

@Nioolek Please sync the lastest dev-3.x

I rebased my branch to dev-3.x

@Itto1992
Copy link

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.

@Nioolek
Copy link
Contributor Author

Nioolek commented Oct 19, 2022

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.

@ZwwWayne ZwwWayne merged commit 157d621 into open-mmlab:dev-3.x Oct 20, 2022
MambaWong pushed a commit to MambaWong/mmdetection-1 that referenced this pull request Oct 21, 2022
… update commands (open-mmlab#8845)

* update Dockerfile

* update Dockerfile

* add explanation for Dockerfile

* make docker small

* format code

* update version of `mmengine`
MambaWong pushed a commit to MambaWong/mmdetection-1 that referenced this pull request Oct 22, 2022
… update commands (open-mmlab#8845)

* update Dockerfile

* update Dockerfile

* add explanation for Dockerfile

* make docker small

* format code

* update version of `mmengine`
MambaWong pushed a commit to MambaWong/mmdetection-1 that referenced this pull request Oct 22, 2022
… update commands (open-mmlab#8845)

* update Dockerfile

* update Dockerfile

* add explanation for Dockerfile

* make docker small

* format code

* update version of `mmengine`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants