I used to use docker desktop with wsl2 integration and there was no problem running containers with gpu support.
However, after a recent update to docker desktop v4.17.1 ( march 2023 ), any containers that I run specifically using the –gpus all tag on wsl hangs forever without any response. The same containers run without any issue unless if specified with the –gpus tag.
running cuda container with nvidia-smi on wsl hangs without any response
Note: nvidia-smi works fine in wsl.
System: windows 11.
- Tried fresh installing docker desktop.
- Tried fresh installation of all wsl distros.
- wsl distros have access to the gpu and nvidia cuda drivers.
- able to use the docker desktop within wsl without any issues unless running any container using the –gpus tag hangs without any errors or a response.
2
Answers
Docker containers with --gpus tag runs fine on wsl without any issues after downgrading docker desktop version to v4.17.0 ( Feb 2023 update ) from v4.17.1 ( march 2023 update ).
April 2023 Update
Docker Desktop 4.18.0 has been released which resolves this issue.
Original answer
This seems to be a known issue with Docker Desktop 4.17.1.
Older versions can be found here: https://docs.docker.com/desktop/release-notes/