Closed WurmD closed 4 years ago
Add --gpus=all
to your docker run
command or change docker run
to nvidia-docker run
. By default docker doesn't pass gpus to the container. If you do this, you should be able to run nvidia-smi
inside the container and get the same output as run outside the container.
I confirm installing nvidia-container-toolkit
as per https://stackoverflow.com/a/58432877/1734357 and then adding --gpus=all
to docker run
resolves it
Hello,
After building the image, and running it
We get
Note that outside docker the GPU is working as intended
Am I not running your code as intended? What were the steps you took to run the code in docker in your machine?