One liners:

# check if GPU is recognizable within container
docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

Docker Desktop WSL 2 backend

CUDA on WSL :: CUDA Toolkit Documentation

Motivation:

Lots of DS folks use Windows for some reason. Also lots of people buy gaming desktops to play with CUDA-enabled Deep Learning. Couple that with official support of such machines by Microsoft and OEMs it makes it lucrative to build support for our infrastructure stack for docker on windows.

Announcing CUDA on Windows Subsystem for Linux 2 | NVIDIA Developer Blog

https://blogs.windows.com/windowsdeveloper/2020/06/17/gpu-accelerated-ml-training-inside-the-windows-subsystem-for-linux/

Challenges:

https://docs.nvidia.com/cuda/wsl-user-guide/index.html#known-limitations

Installation Log