I’ve been trying to run CUDA Docker containers with GPU support using WSL 2 on my Windows system, but I’ve encountered several issues. I would appreciate any help or guidance on how to resolve these problems.
System Information:
OS: Windows 11 Professionnel 64-bit (10.0, Build 22621) (22621.ni_release.220506-1250)
GPU: NVIDIA GeForce GTX 1050 Ti with Max-Q Design
NVIDIA driver version: 31.0.15.3141
CUDA version: 12.1
Issue Description:
I’ve followed the [NVIDIA WSL User Guide] and attempted various solutions to enable GPU support in Docker containers. However, when I try to run a container with GPU support, I either get error messages or the container hangs with no logs.
> docker run -it --gpus all nvidia/cuda:12.1.0-runtime-ubuntu22.04 nvidia-smi
docker: Error response from daemon: 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: WSL environment detected but no adapters were found: unknown.
I also attached the dxdiag
output.
DxDiag.txt (177.4 KB)
Additional Information
I have migrated from Windows 10 to Windows 11 Professional, and I suspect this might be causing some issues. I found a section in the documentation that mentions possible issues with Windows Insider Preview Builds and Windows 10 support.
Although my WSL version seems to be correct, I believe there might be some configuration issues due to the migration that need to be resolved.
I would appreciate any guidance on resolving the issue of accessing the GPU from Docker containers on my system. If there are any known issues or workarounds for systems that have migrated from Windows 10 to Windows 11, please let me know.
Thank you in advance for your help!