WSL2: docker: Error response from daemon:

Hi,
I am trying to install nvidia gpu drivers on Dell G5 laptop with Gefore RTX2060 graphics card. I follow the instructions on page CUDA on WSL :: CUDA Toolkit Documentation.
I installed everything correctly as per the instructions. However when i am testing the GPU by using the given example - sudo docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

I got the following error.

veeru@DESKTOP-RLC204T:~$ sudo docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
[sudo] password for veeru:
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: requirement error: unsatisfied condition: cuda>=11.2, please update your driver to a newer version, or use an earlier cuda container: unknown.
ERRO[0000] error waiting for container: context canceled

any suggestion? Thank you

2 Likes

further updates: Windows 10 Build 21359.co_release.2100409-1536
dpkg -l | grep nvidia
ii libnvidia-container-tools 1.3.3-1 amd64 NVIDIA container runtime library (command-line tools)
ii libnvidia-container1:amd64 1.3.3-1 amd64 NVIDIA container runtime library
ii nvidia-container-runtime 3.4.2-1 amd64 NVIDIA container runtime
ii nvidia-container-toolkit 1.4.2-1 amd64 NVIDIA container runtime hook
ii nvidia-docker2 2.5.0-1 all nvidia-docker CLI wrapper

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.

Failed to properly shut down NVML: Driver Not Loaded

It’s a known bug. You can try skipping the cuda requirement like this:

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

Thank you for this solution

1 Like

This doesn’t seem to work on Windows 21364, Ubuntu 18.04, 470.25 driver, CUDA version 11.4 (CUDA 11.4 toolkit doesn’t seem to be available though). BlackScholes example works.

1 Like

Same issue
Windows 21370
Ubuntu 20.04
Nvidia Driver 470.14
CUDA 11.2

BlackScholes example works fine but any nvidia-docker container throws an expection on start:

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.

There is new info about the “driver error”. See 470.14 - WSL with W10 Build 21343 - NVIDIA-SMI error - #15 by onomatopellan

my wsl2 details, that works without issues

  1. uname -a: 5.10.16.3-microsoft-standard-WSL2
  2. Driver Version: 470.14
  3. CUDA Version: 11.3
  4. OS build: 21370.1