Enable NVIDIA CUDA on WSL
Windows 11 and Windows 10, version 21H2 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.
Install Windows 11 or Windows 10, version 21H2
Install the GPU driver
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.
Ensure you have Receive updates for other Microsoft products when you update Windows 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 18.104.22.168 or higher. You can check the version number by running the following command in PowerShell.
wsl cat /proc/version
Get started with NVIDIA CUDA
Share feedback on NVIDIA's support via their Community forum for CUDA on WSL.
Submit and view feedback for