2

Trying to run a GPU enabled container such as:

docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

I get this error:

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[0025] error waiting for container: context canceled

Running a non-GPU container such as docker run hello-world works fine.

  • I did enable WSL integration in Docker Desktop settings
  • Windows 10 Pro (version 20H2 build 19042.985)
  • Docker Desktop 3.3.3 (64133), engine 20.10.6, compose 1.29.1
  • WSL2 with Ubuntu 20.04
  • Nvidia driver 470.14 + CUDA 11.3
  • Running on a local laptop with Geforce RTX 2070 Max-Q
0

1 Answer 1

3

Can't get GPU support for Docker with WSL2

  • Windows 10 Pro (version 20H2 build 19042.985)

CUDA within WSL2 requirements are a higher Windows build than you are running.. You will have to upgrade to a supported Windows Insider build to achieve your goal

Ensure that you install Build version 20145 or higher. We recommend being on WIP OS 21332 and higher with Linux Kernel 5.4.91+ for the best performance. You can check your build version number by running winver via the Windows Run command.

Additionally:

Ensure you have the latest kernel by clicking “Check for updates” in the “Windows Update” section of the Settings app. If the right update with the kernel 4.19.121+ is installed, you should be able to see it in the Windows Update history. Alternatively, you can check the version number by running the following command in PowerShell: wsl cat /proc/version

2
  • Switching to the Dev channel, which could potentially be unstable, sounds like too big a cost. I'll stick with dual boot for now. Any idea on when this would get into mainstream Windows builds? Commented May 19, 2021 at 6:37
  • @MichaelLitvin - Whenever the build is higher than 20145
    – Ramhound
    Commented May 19, 2021 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .