mmdetection
mmdetection copied to clipboard
Dev 3.x update dockerfile
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.
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
- Pre-commit or other linting tools are used to fix the potential lint issues.
- The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
- The documentation has been modified accordingly, like docstring or example tutorials.
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?
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.
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.
@Nioolek Please sync the lastest dev-3.x
@Nioolek Please sync the lastest dev-3.x
I rebased my branch to dev-3.x
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.
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.