- Windows 11 running Windows Subsystem for Linux (WSL) version 2 with Debian 11
- NVidia Windows 11 driver installed
- No need to install NVidia Linux driver within WSL (source)
-
Open the Debian terminal (e.g., launch Debian from Windows menu)
-
Perform distribution update/upgrade
$ sudo apt update $ sudo apt upgrade $ sudo apt install pciutils gnupg software-properties-common $ sudo apt update
IMPORTANT: ONLY install the toolkit meta package, not the drivers! (source)
-
Open the Debian terminal (e.g., launch Debian from Windows menu)
-
Install NVidia CUDA Toolkit from https://developer.nvidia.com/cuda-downloads
$ wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda-repo-debian11-<cuda-version>-local_<cuda-version-full>-<nvidia-driver-version>_amd64.deb $ sudo dpkg -i cuda-repo-debian11-<cuda-version>-local_<cuda-version-full>-<nvidia-driver-version>_amd64.deb $ sudo cp /var/cuda-repo-debian11-<cuda-version>-local/cuda-*-keyring.gpg /usr/share/keyrings/ $ sudo add-apt-repository contrib $ sudo apt update $ sudo apt install cuda-toolkit-<cuda-version> -
Verify that CUDA toolkit is installed and NVidia GPU is avialable
nvidia-smi
See also: https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#wsl