Skip to content

fix: GPU on Docker Desktop/WSL2 uses the host driver - #19

Merged
kordless merged 1 commit into
mainfrom
fix/wsl-gpu
Oct 14, 2026
Merged

kordless merged 1 commit into
mainfrom
fix/wsl-gpu

Conversation

@kordless

Copy link
Copy Markdown
Contributor

Problem

The local shivvr container ran every model on CPU. The CUDA image puts /usr/local/cuda-12.6/compat first on LD_LIBRARY_PATH (Cloud Run's L4 driver needs it). On Docker Desktop/WSL2 that compat libcuda.so.560 hides the WSL driver Docker injects, so CUDA reports error 100 "no CUDA-capable device is detected" and ONNX Runtime falls back to CPU. /health still says gpu: true.

Change

  • docker-compose.yml and the README GPU docker run set LD_LIBRARY_PATH=/usr/lib/onnxruntime.
  • docs/CONFIGURATION.md says when to use which.

Cloud Run is unchanged: the image default keeps the compat path.

Checked

Recreated the local container with the override on an RTX 3060: the log shows Creating BFCArena for Cuda and no falling back to CPU.

Follow-ups (not here)

  • /health gpu should report whether CUDA actually registered, not the build feature.
  • The image could choose the compat path itself based on the host driver, so no flag is needed.

🤖 Generated with Claude Code

… libcuda

The CUDA image puts /usr/local/cuda-12.6/compat first on LD_LIBRARY_PATH
(Cloud Run's L4 driver needs it). On Docker Desktop/WSL2 that compat
libcuda hides the WSL driver Docker injects, CUDA reports error 100 "no
CUDA-capable device is detected" and every model falls back to CPU, while
/health still says gpu: true.

docker-compose.yml and the README GPU command now set
LD_LIBRARY_PATH=/usr/lib/onnxruntime; docs/CONFIGURATION.md says when.
Checked locally on an RTX 3060: with the override the log shows
"Creating BFCArena for Cuda" and no CPU fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kordless
kordless merged commit 34423b4 into main Oct 14, 2026
1 check passed
@kordless kordless mentioned this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant