Skip to content

Instantly share code, notes, and snippets.

@daffychuy
Last active November 15, 2021 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daffychuy/33836af680830a56deecbbb97b6f7381 to your computer and use it in GitHub Desktop.
Save daffychuy/33836af680830a56deecbbb97b6f7381 to your computer and use it in GitHub Desktop.
Install CUDA in WSL2 (Tested on Windows 11 and Ubuntu 20.04 with driver 496.49)
Since WSL uses driver from Windows, you do not need to install driver in WSL. but 495.00 or higher is required for CUDA 11.5
# Install CUDA
wget https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run
sudo sh cuda_11.5.0_495.29.05_linux.run
export PATH=/usr/local/cuda-11.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.5/lib64:$LD_LIBRARY_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment