AI Agent Hub
Back to plugins
🤖

dsh-wsl-gpufix

Model Inference Updated 2026.09.09

Run the following command in DeepSeek Harness:

dsh plugin install Jumqyc/dsh-wsp-gpufix

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Jumqyc/dsh-wsp-gpufix in the DeepSeek Harness terminal to install; the source lives at https://github.com/Jumqyc/dsh-wsp-gpufix. Source: https://github.com/Jumqyc/dsh-wsl-gpufix

About this plugin

When running DSH on WSL2, the Landlock sandbox hard-codes a device whitelist that denies read-write access to /dev/dxg and /proc. The result is simple: torch.cuda.is_available() always returns False and CUDA initialization fails with error 100 or 304. This plugin exists to close exactly that gap.

It hooks the public sandbox.confine() seam via the Cordis host-composition mechanism and appends --rw /dev/dxg and --rw /proc to the Landlock argument list before the session starts. The confined bash agent can then open the GPU device and complete CUDA thread registration without any vendor file being patched, the sandbox being disabled, or the approval policy being altered. Unloading the plugin restores the original method immediately.

If you rely on DSH for multi-model inference on WSL2, need PyTorch GPU acceleration, and want to keep the isolation guarantees that the sandbox provides, this plugin offers a lightweight, reversible way to grant just the two device paths that CUDA requires.

Use Cases

  • torch.cuda.is_available() keeps returning False inside a confined DSH bash session on WSL2
  • nvidia-smi reports GPU access blocked by the operating system within the sandbox
  • CUDA initialization fails with error 100 or 304 while the GPU works fine in an unsandboxed terminal

Best For

  • Developers relying on DSH for PyTorch GPU inference on WSL2
  • DSH users who want to keep Landlock sandbox isolation while accessing GPU devices
  • End users hitting CUDA device denial in the sandbox without wanting to hand-craft Landlock configs