Hi, I am trying to install the latest CUDA version in the WSL2 on my notebook (NVIDIA GeForce RTX 3060 6GB) to use it for GROMACS. I started by purging all of the NVIDIA related files and followed the installation guide:
During the process I encountered multiple errors or did not really know what to do next, but so far I was more or less able to solve everything and continue. Some of the issues:
1 The command lspci | grep -i nvidia
did not work - probably due to WSL?
2 Install GPUDirect Storage:
I have no clue, if this is important for me. It was to complex to understand and seemed to be rather tedious to install.
3 The command nvcc
yields
Command 'nvcc' not found, but can be installed with:
sudo apt install nvidia-cuda-toolkit
which seems strange to me, since this is what I just installed, right? So overall, where is the difference between the complicated setup shown on the website and the single command
sudo apt install nvidia...
?
4 The command systemctl status nvidia-persistenced
yielded
system has not been booted with systemd as init system (pid 1). can't operate. Failed to connect to bus: Host is down.
After I activated systemd, I received another error message, which is my current problem:
Unit nvidia-persistenced.service could not be found.
Unfortunately, I cannot find a lot of information concerning this problem.
For installation I used the following commands:
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/12.3.0/local_installers/cuda-repo-wsl-ubuntu-12-3-local_12.3.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-12-3-local_12.3.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-3
I also exported the path into the $PATH variable in my .profile file:
if [ -d "/usr/local/cuda-12.2" ] ; then
export CUDA_HOME=/usr/local/cuda-12.2
export PATH=${CUDA_HOME}/bin:${PATH:+:${PATH}}
fi
The command
nvidia-smi
yields:
Tue Oct 31 23:26:24 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.01 Driver Version: 546.01 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3060 ... On | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 10W / 65W | 12MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 408 G /Xwayland N/A |
+---------------------------------------------------------------------------------------+
I would be really glad, if someone could help me with this. Probably all the errors root in the same underlying problem. Unfortunately I am not an export in this field and I cannot solve these problems on my own. Big thanks in advance!