Installation of older CUDA versions on WSL2

Hi,
I’m working on Windows 11 and WSL2 and using the CUDA version 12.1 which I installed following these instructions: NVIDIA GPU Accelerated Computing on WSL 2 — wsl-user-guide 12.2 documentation

I’m working with Nanopore Sequencing and the programm as well as another pipeline I use are not able to use GPU-based sequening although nividia-smi results in the uploaded image. It seems as if they do not recognize the GPU and automatically swich back to CPU.


MiKNOW runs on Windows, the other pipeline on WSL2.

Nanopore support suggested to downgrade the CUDAtoolkit to 11.8.
The Nvidia websites states the following:
users must not install any NVIDIA GPU Linux driver within WSL 2 . One has to be very careful here as the default CUDA Toolkit comes packaged with a driver, and it is easy to overwrite the WSL 2 NVIDIA driver with the default installation.”

Trying to get the 11.8 version from the nvidia download archive does not show any version for wsl2 → I’m not allowed to put a second link into one post

Since I am very new to anything with linux, command line etc. I have now no clue how to downgrade to version 11.8 without destroying everything and would appreciate any help.

Kind regards,
Natalia

1 Like

Hi, I just came across the same problem. I want to install CUDA 8, and I currently have CUDA 12.2. Have you managed to install legacy CUDA versions yet?

Hi, unfortunatly I still didn’t manage. If you get any help, please let me know!

any updates? been stuck on this for a few days

Did you try sudo apt-get --purge remove cuda-12.1 and then installing 11.8 for WSL2 via terminal as below?

wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda=11.8.0-1