Enable NVIDIA CUDA on WSL
Windows 11 and later updates of Windows 10 support running existing ML tools, libraries, and popular frameworks that use NVIDIA CUDA for GPU hardware acceleration inside a Windows Subsystem for Linux (WSL) instance. This includes PyTorch and TensorFlow as well as all the Docker and NVIDIA Container Toolkit support available in a native Linux environment.
To use these features, you can download and install Windows 11 or Windows 10, version 21H2.
Download and install the NVIDIA CUDA enabled driver for WSL to use with your existing CUDA ML workflows. For more info about which driver to install, see:
Once you've installed the above driver, ensure you enable WSL and install a glibc-based distribution, such as Ubuntu or Debian. Ensure you have the latest kernel by selecting Check for updates in the Windows Update section of the Settings app.
Note
Ensure you have Receive updates for other Microsoft products enabled. You can find it in Advanced options within the Windows Update section of the Settings app.
For these features, you need a kernel version of 5.10.43.3 or higher. You can check the version number by running the following command in PowerShell.
wsl cat /proc/version
Now follow the instructions in the NVIDIA CUDA on WSL User Guide and you can start using your exisiting Linux workflows through NVIDIA Docker, or by installing PyTorch or TensorFlow inside WSL.
Share feedback on NVIDIA's support via their Community forum for CUDA on WSL.