Guide to run CUDA + WSL + Docker with latest versions (21382 Windows build + 470.14 Nvidia)

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 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

All of these can’t run nvidia-smi.
And there are some error messages shown in the container by

WARNING: The NVIDIA Driver was not detected.  GPU functionality will not be available.
   Use 'nvidia-docker run' to start this container; see .

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 ...

Which deep learning images can be used?

Hello, everyone. For the question nvidia-smi can’t use in, there maybe some bug in docker for windows.
I have tried the method in CUDA on WSL :: CUDA Toolkit Documentation ( to install nvidia-docker in wsl2. It works.
When you use nvidia-docker, attention:

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: cannot open shared object file: no such file or directory: unknown.