When you specify to docker --gpus all (or some variant of that switch) you are using the GPU-enabled version of docker (which is recommended, if you are using GPUs).
When properly set up, that docker GPU enablement should allow you to run a version of CUDA that is less than or equal to the CUDA (driver API) version that is reported by nvidia-smi.
In your case, nvidia-smi is reporting support for up to CUDA version 11.1, and that means you can pull/run/use a docker container that is based on CUDA 10.0, for example (as is the case in your example.)
There don't appear to be any problems in the output you have shown.
The CUDA toolkit version you have installed on the base machine is irrelevant for what is being used in the container, but the CUDA driver version (which is what is reported by nvidia-smi will dictate the latest CUDA toolkit version you can use, whether in the container, or on the base machine. But the CUDA toolkit in the base machine and the CUDA toolkit in the container do not interact, and have no relevance to each other.
Only the GPU driver version (i.e. the CUDA version supported by the GPU driver installed on the base machine) matters for compatibility.
Yes, you can.
When you specify to docker
--gpus all
(or some variant of that switch) you are using the GPU-enabled version of docker (which is recommended, if you are using GPUs).When properly set up, that docker GPU enablement should allow you to run a version of CUDA that is less than or equal to the CUDA (driver API) version that is reported by
nvidia-smi
.In your case,
nvidia-smi
is reporting support for up to CUDA version 11.1, and that means you can pull/run/use a docker container that is based on CUDA 10.0, for example (as is the case in your example.)There don't appear to be any problems in the output you have shown.
The CUDA toolkit version you have installed on the base machine is irrelevant for what is being used in the container, but the CUDA driver version (which is what is reported by
nvidia-smi
will dictate the latest CUDA toolkit version you can use, whether in the container, or on the base machine. But the CUDA toolkit in the base machine and the CUDA toolkit in the container do not interact, and have no relevance to each other.Only the GPU driver version (i.e. the CUDA version supported by the GPU driver installed on the base machine) matters for compatibility.