Search code examples
dockercudanvidia-docker

Does it matter if the version of cuda on docker is different from the version of cuda on the PC?


I have cuda-10.1 installed on my PC. Currently, the latest version of cuda is cuda11.0. I am considering using docker cuda version 11.0 without changing the cuda version on my PC. In this case, will the cuda used in the container be 11.0?


Solution

  • The CUDA version used in the container will be whatever CUDA version is installed in the container. It doesn't have any connection to the CUDA version installed on the PC (i.e. the base machine). However, the GPU driver version installed on the PC must support the CUDA version you intend to use in the container.

    (If you also have CUDA installed on the PC, and want to use it there also, outside of any container use, then the GPU driver version installed on the PC must also be sufficient to support that version of CUDA as well.)

    You can see the minimum driver versions required to support specific CUDA versions in table 2 here.

    If you're going to use CUDA in a container you are strongly encouraged to use the NVIDIA container toolkit.