Thanks for the guide! The benchmark is up and working for me when I run from windows, however when I try to run the third example (CUDA on WSL :: CUDA Toolkit Documentation) I get:
WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
Use 'nvidia-docker run' to start this container
Where you able to run that example correctly and get the NVIDIA drivers detected?
Hi - I was able to get the tensorflow docker image running - if that’s your question. I checked the GPU was exposed in it, and was able to run some test cases. I was also able to install CUDA natively on the WSL (and also on Windows) and run the BlackScholes example (on both).
Sorry I forgot to include that in the post but when I start my docker I use that, Tensorflow can find the GPU so I guess it can work I just don’t know if ill be able to use tensorrt in the container since it says it can’t find drivers
So - I’ve been thinking - why do we need to run containers at all now? I am also able to get tensorflow running natively on Windows (actually that’s what I have been doing last few days) - since they (and also Pytorch) are natively supporting Windows. And everything seems to work just fine.
Maybe using via the WSL Docker just adds too much complexity…
I’m actually going to be running container in the cloud, so having same environment local is a huge win for me. I did go through the steps in original post and everything worked from GPU perspective! However I had to roll back because the latest windows build caused my system to hang and crash every 5 minutes or so. :( so i’m back to square one.
For anyone who, after running the above docker run command in WSL2 got this error (like I did):
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied
The reason is that the user running the command is not a member of the docker group. To add yourself to the docker group, run:
sudo usermod -a -G docker $USER
Then logout and log back in.
After logging back in, confirm you are a member of the docker group by typing:
$ groups
You should see “docker” in the list displayed.
Otherwise, worked great! Just remember, if you copy & paste docker CUDA sample command lines from the NVIDIA pages, remember to add --env NVIDIA_DISABLE_REQUIRE=1 to the line you copied.
Hi - to anyone reading this now - install Docker Desktop 3.5.1.66090 or higher directly. I have verified with both 3.6 and 4.0 - which both seem to work fine, and also no longer require the flag --env NVIDIA_DISABLE_REQUIRE=1.
Hi, I have tested docker 4.0 with win11, it works.
But I can’t use any cuda image from hub.
I have tried:
docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:21.08-py3 bash
docker run --gpus all -it --rm nvidia/cuda:11.4.1-devel-ubuntu18.04 bash
docker run --gpus all -it --rm nvidia/cuda:10.2-devel-ubuntu18.04 bash
WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
Use 'nvidia-docker run' to start this container; see
https://github.com/NVIDIA/nvidia-docker/wiki/nvidia-docker .
NOTE: MOFED driver for multi-node communication was not detected.
Multi-node communication performance may be reduced.
NOTE: The SHMEM allocation limit is set to the default of 64MB. This may be
insufficient for PyTorch. NVIDIA recommends the use of the following flags:
nvidia-docker run --ipc=host ...
When running the NGC Deep Learning (DL) Framework GPU containers in WSL 2, you may encounter a message:
The NVIDIA Driver was not detected. GPU functionality will not be available.
Note that this message is an incorrect warning for WSL 2 and will be fixed in future releases of the DL Framework containers to correctly detect the NVIDIA GPUs. The DL Framework containers will still continue to be accelerated using CUDA on WSL 2.
I installed docker-desktop4.24.06 in Windows 10 19042.928. The graphics card driver is 537.42 and the following error is reported. How should I solve it?
The image has been installed without any problems
docker run --gpu all
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as ‘legacy’
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.