apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Using nvidia-docker instead of docker to start apollo container.

Open wanglei828 opened this issue 8 years ago • 5 comments

Recently I figure out a way to resolve the GPU driver inconsistent issues between host machine and docker container. One easy way is like this

  1. Install nvidia-docker in the host machine (https://github.com/NVIDIA/nvidia-docker). Don't remove the original docker. Nvidia-docker will use the "docker" command implicitly.
  2. Build dev image from the nvidia image base (https://hub.docker.com/r/nvidia/cuda/). Remove all the installation of cuda and cudn package from the dev docker file, and don't install any gpu driver inside the docker.
  3. Using "nvidia-docker run " in the dev_start.sh instead of "docker run" to start the container. In this way, you host machine gpu driver will be automatically mapped into the docker container, and you don't worry about you host machine's gpu driver version is different from docker image anymore. @ycool @startcode @jinghaomiao

wanglei828 avatar Apr 05 '18 18:04 wanglei828

Great to know! I will try it. Thank you, Lei!

xiaoxq avatar Apr 05 '18 18:04 xiaoxq

@wanglei828 Hi, would you mind sharing more details of the second step? Do you mean remove all cuda directories under /user/local? After I followed your instructions, I got the same error and nvidia-smi not installed.

My host info Nvidia driver version: 384.111 CUDA: 8.0 cudnn 6.0

Thanks!

kikacaty avatar Apr 30 '18 15:04 kikacaty

I am also looking for more information about step 2.

I still get "Failed to initialize NVML: Driver/library version mismatch"

snuffysasa avatar Jul 06 '18 23:07 snuffysasa

Please refer to the following commit to resolve your errors. If you face any additional errors, please let us know.

natashadsouza avatar Aug 31 '18 20:08 natashadsouza

need GPU arguments

shizheng163 avatar Dec 23 '19 03:12 shizheng163