-
Notifications
You must be signed in to change notification settings - Fork 526
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
Add a Dockerfile including DCNv2 GPU compilation #176
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 all
option. Execute the docker run command as follows.