Skip to content

CUDA inside a smolvm machine

Lets an agent run CUDA GPU workloads inside a smolvm VM on a real NVIDIA GPU and verify the device is reached

Stars
6,901
Licence
Apache-2.0
Files
8 files

What it does

Normally a program inside a virtual machine cannot use the host's NVIDIA graphics card for computing. With this skill, the agent knows how to start a smolvm microVM with the --cuda option, which forwards CUDA driver calls to the host GPU, and how to check that real GPU work happened rather than trusting a zero exit code. It also includes a read-only preflight check, a probe script, and a cleanup routine for the large CUDA images and machines it creates.

Great for

  • Developers who need to run CUDA compute jobs in an isolated smolvm VM on a Linux or Windows machine with an NVIDIA GPU
  • Teams checking whether a given host can support CUDA inside smolvm before investing time in setup
  • People debugging a --cuda guest where nvidia-smi is missing or a CUDA program passes without touching the device

Skip it if

  • Graphics or Vulkan workloads, which use the separate --gpu feature (docs/gpu.md), not this skill
  • Macs, which have no CUDA driver, so the skill only reports that CUDA is unavailable there
  • Non-technical users without a smolvm install and an NVIDIA GPU, since the scripts assume both and the skill is developer-oriented

Try asking

  • “Check whether this machine can run CUDA inside a smolvm VM”
  • “Run my CUDA vector add inside a smolvm machine and confirm it actually reaches the GPU”
  • “Why does nvidia-smi show nothing inside my --cuda guest?”
  • “Clean up the CUDA machines and images I created with smolvm”
Step-by-step guide: how to use CUDA inside a smolvm machineInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 8 original files, the Apache-2.0 licence and an attribution note.

    gpu-cuda.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip gpu-cuda.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip gpu-cuda.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run scripts/preflight.sh first; if result=blocked with gpu_present=no, stop there because the probe on a host without an NVIDIA GPU can pass using a CPU emulation device.
  • Trust only the device name (device_kind=gpu) and the round-trip check, never the exit code alone.
  • Run scripts/cleanup.sh --purge after CUDA work, since CUDA images are large, and review the scripts before running them since they execute on your host.

What's inside

  • README.md
  • references/traps.md
  • references/windows.md
  • scripts/cleanup.sh
  • scripts/cuda-probe.py
  • scripts/preflight.sh
  • scripts/run-cuda-probe.sh
  • SKILL.md

Redistributed unmodified from smol-machines/smolvm under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-11-02. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.