Once you begin working with WSL, or the windows subsystem for Linux, You run into all sorts of issues with drivers. You’ve installed on your windows, for some reason not working on your Linux environment.
The issue we’re going to deal with here is in regards to the installation of your cuda toolkit.
Before We move on however, the issue is that even though Cuda installs to your windows environment comment your Ubuntu environment does not have the same access. For you have to manually download it. Problem of course is that you found a billion different ways to do it and 90% of them don’t work. This one does
These instructions can be found here however, it’s quite likely you found your way here before there (in other words, its not obvious to find).
1. Open up WSL and type:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
Now, before you think you’ve made it
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
Leave a Reply