Add a Dockerfile including DCNv2 GPU compilation#176
Add a Dockerfile including DCNv2 GPU compilation#176Keiku wants to merge 2 commits intoxingyizhou:masterfrom Keiku:feature/docker
Conversation
|
Thanks for your dockerfile!!! I had some problem about "qt.qpa.xcb: could not connect to display" Can you help me? root@a2118cd70918:/CenterTrack/src# python demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633 Available platform plugins are: xcb. |
|
@ahyunlee Since the Docker environment does not have a display, please modify |
Thanks! It worked! I commented 'cv2.imshow' in all files. |
Hey @Keiku , thank you for kindly sharing your work on containerizing CenterTrack. I'm facing the same trouble with the issue about GPU compilation of DCNv2, so I've tried use your Dockerfile and docker-compose without success. Can you share an updated version of this files? |
|
@fabio-cancio-sena Please tell me the version of your Docker. By the way, in my understanding, nvidia-docker2 is unnecessary. Instead NVIDIA Container Toolkit is required. You can find it with a command like the following |
I see. Do you have an updated version of your Dockerfile? I'm having trouble building DCN locally and with torch (GPU not available) with your old dockerfile. Here are the softwares versions:
nvidia-container-cli -V |
|
@fabio-cancio-sena I also confirmed the error in the following environment. It was a long time ago, so I can't resolve the error right now. I will try to resolve the error as soon as I have free time. Please try it yourself for the time being. |
| RUN python -c 'import torch; assert torch.cuda.is_available(), "Cuda is not available."' | ||
| WORKDIR /CenterTrack/src/lib/model/networks | ||
| RUN git clone --recursive https://github.com/CharlesShang/DCNv2 | ||
| RUN cd DCNv2 && bash ./make.sh |
There was a problem hiding this comment.
Use a symlink otherwise the make.sh will fail. Also use WORKDIR to change directory not cd
RUN ln -s /usr/bin/python3.6 /usr/bin/python
COPY . /centertrack
WORKDIR /centertrack/src/lib/model/networks/
RUN git clone --recursive https://github.com/CharlesShang/DCNv2
WORKDIR DCNv2
RUN /bin/bash make.sh
|
Does Anyone encounter this error? I am not sure whether it is caused by pytorch version. I checked the docker info. It is the same as yours. Any thoughts on this ? I appreciate you in advance. |
|
Note that you need to run |
| RUN apt-get install -y --no-install-recommends software-properties-common | ||
| RUN add-apt-repository ppa:deadsnakes/ppa | ||
| RUN apt update | ||
| RUN apt install -y --no-install-recommends python3.6 |
There was a problem hiding this comment.
RUN apt update
RUN apt install -y --no-install-recommends python3.6
doesn't seem to work anymore
RUN apt-get install -y python3.6 + using nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 as base image fixed that for me
Everyone seems to be having trouble with issue about GPU compilation of DCNv2, so I added a Dockerfile that works correctly.
I have confirmed the operation in the following environment.
If you want to use cuda when building docker container, you need to set the following
daemon.json.After preparing the above environment, execute Docker build with the following command.
You cannot build with cuda unless you add the following to
docker-compose.yaml.For Docker 19.03 and later versions, use the
--gpus alloption. Execute the docker run command as follows.docker run --gpus all --ipc=host --rm -it \ -v /home/keiichi.kuroyanagi/datasets/:/CenterTrack/data/ \ -v /home/keiichi.kuroyanagi/pretrained_models/:/CenterTrack/models/ \ centertrack_dev