You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WSL2 guide: the installer never sets up the NVIDIA Container Toolkit under WSL, so the AI Assistant silently runs on CPU
#1467
The WSL2 guide's GPU table says "NVIDIA RTX/GTX: Yes. Install the latest Windows NVIDIA driver. That's it." On my install (Windows 11, WSL2 Ubuntu, Path A, RTX 5080, driver current, nvidia-smi working in the shell) that was not enough: the AI Assistant came up CPU-only, and gotcha 5's check showed library=CPU. The reason is in install_nomad.sh's GPU detection, and it is WSL-specific, so I think it belongs in the guide rather than the installer (per #572).
Why the installer misses the GPU under WSL2
install_nomad.sh looks for an NVIDIA card with lspci | grep -i nvidia, then falls back to command -v nvidia-smi:
lspci lists nothing under WSL2: the GPU is paravirtualized through /dev/dxg, not a PCI device the distro can see.
nvidia-smi lives in /usr/lib/wsl/lib, which is on the user's PATH but not on root's under sudo (secure_path), so the fallback finds nothing either.
So the script prints No NVIDIA GPU detected. Skipping NVIDIA container toolkit installation., the toolkit is never installed, Docker has no nvidia runtime, and nomad_ollama starts without GPU access. Nothing in the UI says so; only gotcha 5's log check does.
Suggested guide additions (Path A, before step 6)
Either run the installer with the user's PATH so its own fallback works:
sudo env "PATH=$PATH" bash install_nomad.sh
or install the toolkit yourself before running the installer, which is what I did:
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
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo systemctl restart docker
docker run --rm --gpus all ubuntu nvidia-smi # should print the card
--set-as-default matters: without it the GPU drops out of nomad_ollama after a reboot (#713).
And in gotcha 5, a line that library=CPU on WSL2 almost always means the toolkit was never installed (the installer cannot detect the GPU there), not a version mismatch.
One smaller note for gotcha 3
The command="mount --make-rshared /" line in wsl.conf only takes effect after wsl --shutdown; the guide says so, but if the installer is run before that first restart, the install fails at nomad_disk_collector after /opt/project-nomad and the credentials have been created. A quick check before step 6 saves the rerun: findmnt -no PROPAGATION / should print shared.
Happy to turn this into a PR against wherever the guide's source lives, if that is easier than editing from this post.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
The WSL2 guide's GPU table says "NVIDIA RTX/GTX: Yes. Install the latest Windows NVIDIA driver. That's it." On my install (Windows 11, WSL2 Ubuntu, Path A, RTX 5080, driver current,
nvidia-smiworking in the shell) that was not enough: the AI Assistant came up CPU-only, and gotcha 5's check showedlibrary=CPU. The reason is ininstall_nomad.sh's GPU detection, and it is WSL-specific, so I think it belongs in the guide rather than the installer (per #572).Why the installer misses the GPU under WSL2
install_nomad.shlooks for an NVIDIA card withlspci | grep -i nvidia, then falls back tocommand -v nvidia-smi:lspcilists nothing under WSL2: the GPU is paravirtualized through/dev/dxg, not a PCI device the distro can see.nvidia-smilives in/usr/lib/wsl/lib, which is on the user's PATH but not on root's undersudo(secure_path), so the fallback finds nothing either.So the script prints
No NVIDIA GPU detected. Skipping NVIDIA container toolkit installation., the toolkit is never installed, Docker has nonvidiaruntime, andnomad_ollamastarts without GPU access. Nothing in the UI says so; only gotcha 5's log check does.Suggested guide additions (Path A, before step 6)
Either run the installer with the user's PATH so its own fallback works:
or install the toolkit yourself before running the installer, which is what I did:
--set-as-defaultmatters: without it the GPU drops out ofnomad_ollamaafter a reboot (#713).And in gotcha 5, a line that
library=CPUon WSL2 almost always means the toolkit was never installed (the installer cannot detect the GPU there), not a version mismatch.One smaller note for gotcha 3
The
command="mount --make-rshared /"line inwsl.confonly takes effect afterwsl --shutdown; the guide says so, but if the installer is run before that first restart, the install fails atnomad_disk_collectorafter/opt/project-nomadand the credentials have been created. A quick check before step 6 saves the rerun:findmnt -no PROPAGATION /should printshared.Happy to turn this into a PR against wherever the guide's source lives, if that is easier than editing from this post.
All reactions