Failure to install CUDA on WSL 2 Ubuntu

You are right @hensou, that solved it.
Thank you for your help!

I am having the same problem as @quizz.0n but solution not work for me. Please see below the output messages.
Currently running OS Build 21370.1

$ sudo docker run --gpus all --env NVIDIA_DISABLE_REQUIRE=1 nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown. ERRO[0000] error waiting for container: context canceled

uname -a Linux DESKTOP-1PN86KG 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

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

`$ ls /dev/dxg
/dev/dxg

$ ls /usr/lib/wsl/lib/
libcuda.so libcuda.so.1 libcuda.so.1.1 libd3d12.so libd3d12core.so libdxcore.so libnvcuvid.so.1 libnvidia-encode.so.1 libnvidia-ml.so.1 libnvidia-opticalflow.so.1 libnvwgf2umx.so nvidia-smi

ls C:\Windows\System32\lxss\lib

Каталог: C:\Windows\System32\lxss\lib

Mode LastWriteTime Length Name


-a---- 18.03.2021 6:41 137264 libcuda.so
-a---- 18.03.2021 6:41 137264 libcuda.so.1
-a---- 18.03.2021 6:41 137264 libcuda.so.1.1
-a---- 25.04.2021 13:52 785608 libd3d12.so
-a---- 25.04.2021 13:52 5398256 libd3d12core.so
-a---- 25.04.2021 13:52 827904 libdxcore.so
-a---- 18.03.2021 6:41 6053064 libnvcuvid.so.1
-a---- 18.03.2021 6:41 424440 libnvidia-encode.so.1
-a---- 18.03.2021 6:41 197104 libnvidia-ml.so.1
-a---- 18.03.2021 6:41 354808 libnvidia-opticalflow.so.1
-a---- 18.03.2021 6:41 47582360 libnvwgf2umx.so
-a---- 18.03.2021 6:41 670104 nvidia-smi

wsl -l -v
NAME STATE VERSION

  • Ubuntu-20.04 Running 2
    docker-desktop Running 2
    docker-desktop-data Running 2`


@ELDIABLO4400 See nvidia-docker 2.6.0-1 - not working on Ubuntu WSL2 · Issue #1496 · NVIDIA/nvidia-docker (github.com)

You will need to either downgrade libnvidia-container1 to version 1.3.3 or downgrade DockerDesktop to 3.3.1 or wait for a nvidia GPU driver update

1 Like

It’s work! Thank you very much!

1 Like