3

I have Windows 10 along with Ubuntu 20.04.01 GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64 installed (latest for WSL2 - please see edits below- this has changed). I'm a Windows Insider user and my Win10 distribution is Dev 21376.1 (as required for the NVIDIA drivers to be recognized in WSL2 - please see the documentation in the link below).

My GPU is an NVIDIA Quadro RTX 4000 with the latest driver: 470.14 (latest - please see edits below - this has changed).

I have installed the Cuda-toolkit version 11.0.3-1 (latest) inside WSL2.

However, despite following the NVIDIA in WSL2 instructions, I can't say for sure that my NVIDIA card is being recognised by Ubuntu instructions in WSL2. For example, my distribution of Gromacs 2021.2 says it can't see a GPU.

Also, when I execute nvidia-smi in WSL2 I get:

ubuntu@DESKTOP-L2JG9M2:~$ nvidia-smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

I have been following these instructions: https://docs.nvidia.com/cuda/wsl-user-guide/index.html#installing-nvidia-drivers

I'm really not sure where to go from here. How do I get WSL2 to recognise my Windows 10 NVIDIA driver (do not install a Linux display driver in WSL2, see the documentation in the link) and how do I know it works?

I have just finished installing Docker and NVIDIA docker etc as per the instruction. I'm not sure what the next step is. I still can't see nvidia drivers in WSL2 via nvidia-smi.

edit #1

wsl cat /proc/version
Linux version 5.10.16.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Apr 2 22:23:49 UTC 2021

edit #2 I followed the link provided in the comments below and adjust various packages and libraries according to a work around:

apt-get install nvidia-docker2:amd64=2.5.0-1 \
           libnvidia-container-tools:amd64=1.3.3-1 \
           nvidia-container-runtime:amd64=3.4.2-1 \
           libnvidia-container1:amd64=1.3.3-1 \
           nvidia-container-toolkit:amd64=1.4.2-1

Unfortunately, nvidia-smi still complains that a GPU is not present. I would assume this is nvidia driver related and has nothing to do with nvidia-docker or docker?

In essence, I just don't know how to get software installed in WSL to recognize my GPU despite following all the steps. I have the same card working on a neighboring pure Ubuntu machine without a problem. Also, the software I am trying to run (Gromacs), does not require anything to do with dockers or virtual environments etc. I don't want any of that, it's causing me and my system to drown in a sea of different versions etc. Here is a version update:

  • Linux DESKTOP-L2JG9M2 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • NVIDIA Quadro RTX 4000 - Version 461.55 (I downgraded as recommended)

As for my docker version (do I even need this?)

Client: Docker Engine - Community
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:47:17 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community Engine: Version: 20.10.6 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: 8728dd2 Built: Fri Apr 9 22:45:28 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.4 GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e runc: Version: 1.0.0-rc93 GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec docker-init: Version: 0.19.0 GitCommit: de40ad0

harrymc
  • 498,455

0 Answers0