Using nvidia-docker instead of docker to start apollo container.
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
- 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.
- 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.
- 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
Great to know! I will try it. Thank you, Lei!
@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!
I am also looking for more information about step 2.
I still get "Failed to initialize NVML: Driver/library version mismatch"
Please refer to the following commit to resolve your errors. If you face any additional errors, please let us know.
need GPU arguments