Hello and welcome to this video on how to
set up a CUDA environment on WSL. First of all, let's start with a couple of assumptions.
We will assume that you have installed Windows 11 on your system and we will assume that you
have enabled the virtualization extensions in your BIOS. The first thing to do is to simply
download the latest version of the NVIDIA driver that matches your system. Note that the Windows
driver contains everything needed for WSL. This means that every single driver going
forward is going to support WSL from the get-go. You do not need to download any
specific drivers. The regular driver will work fine. Once the driver is installed
on your system, you can now set up WSL. Now that the driver is installed, the next step
is to set up WSL itself. We will set it up via the Microsoft store. If you encounter any issues
at this point, make sure that the virtualization extensions are enabled in your BIOS, and that
in the Windows features, you are able to turn on the Windows virtualization platform and the
windows subsystem for Linux. Once that is done, you will need to pick your Linux distribution.
For the sake of this presentation we are going to use Ubuntu. Once your distribution is installed,
you can check that it works correctly and that the GPU is visible by running NVIDIA SMI.
If you only need to run CUDA applications you are all set. However, if you want to
also develop CUDA applications in WSL, you will need to install the CUDA toolkit. First
we will install build essentials which is needed to do the installation using a run file, and
then we will download the CUDA toolkit from our website. Make sure to pick the WSL Ubuntu toolkit
in that case. We will do the installation using a run file. It has the advantage of safeguarding us
against accidentally installing the Linux native display driver on the top of our currently
installed WSL driver, which will cause some issues. Once the toolkit is fully installed, we
can check that it works correctly by running some of the CUDA samples that have just been installed.
If they all run successfully, you are all set. Thank you so much for your attention and we can't
wait to see what you will do with CUDA on WSL.