[idea] Docker 13/14: Refuse a CUDA image with no GPU
Author: AnishSarkar22Created Oct 1, 2026Updated Oct 1, 2026
Labelsenhancementhelp wanteddesktopdocker
Which part? Desktop app
What would you like?
Step 13 of 14 of #2100: running SurfSense in Docker. Depends on #2112; start once it is merged.
Stop the most common GPU mistake: starting a CUDA image without giving it the card, which silently runs on the CPU.
Design: GPU images, A CUDA image with no GPU
What to change
surfsense_local/electron/src/headless/gpu-check.ts: on a CUDA image, runllama-server --list-devicesbefore boot; with no CUDA device, exit with a message naming the fix.SURFSENSE_ALLOW_CPU=1skips the refusal.
Done when
- A
-cudaimage started without--gpusexits with the message. - With
SURFSENSE_ALLOW_CPU=1it starts on the CPU. - The CPU image never runs the check.
- CI checks both cases on a runner without a GPU.
Scope: code and tests only. Don't edit docs/ or AGENTS.md, except to fix a link this change breaks; the maintainers update the docs when the Docker work ships.
Why would it help?
Each step leaves something that runs, so the Docker image is built and reviewed one piece at a time.
Source: MODSetter/SurfSense