spark-environment-setup

spark-environment-setup is a skill for Claude Code, Codex from wshobson/agents. It costs 76 tokens per session (2,086 once invoked), scanned A, original, MIT.

A guide to installing and checking machine-learning software on NVIDIA DGX Spark, whose processor uses the aarch64 architecture and CUDA 13. It covers PyTorch and related tools in containers or direct package installations.

In plain words
What is it for?
Use it to prepare a new DGX Spark, repair an installation, diagnose library errors, or choose between an NGC container and direct package installation.
Why use it?
It helps avoid software packages that install successfully but cannot load, use the GPU, or match the system's CUDA version and processor architecture.

Skill for Claude CodeCodex

Part of the dgx-spark-ops plugin — 3 skills, 1 command, 1 agent shipped together

About the project

Agentic Plugin Marketplace is a collection of reusable plugins, agents, skills, commands, and rules for coding-agent tools including Claude Code, Codex CLI, Cursor, OpenCode, Antigravity CLI, and GitHub Copilot. It is for developers assembling agentic workflows across multiple harnesses from shared Markdown sources, and the catalogue entries are examples or subsets of those workflow components.

wshobson/agents · 39,424 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wshobson/agents/spark-environment-setup
Any agent
npx skills add wshobson/agents --skill spark-environment-setup
Clone the repo
git clone --depth 1 https://github.com/wshobson/agents

Made for: Claude Code, Codex.

Or install dgx-spark-ops, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spark-environment-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/wshobson/agents/spark-environment-setup.svg)](https://agentmods.dev/skills/wshobson/agents/spark-environment-setup)
Your own site
<a href="https://agentmods.dev/skills/wshobson/agents/spark-environment-setup"><img src="https://agentmods.dev/badge/skills/wshobson/agents/spark-environment-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,086 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00076 $0.02086
Opus 5 $0.00038 $0.01043
Sonnet 5 $0.00015 $0.00417
Haiku 4.5 $0.00008 $0.00209

Measured yesterday against content hash 4fe4b4328a52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spark-environment-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spark Environment Setup

DGX Spark ships a GB10 Grace Blackwell chip: aarch64 CPU, SM121 GPU, 128GB unified memory, CUDA 13. This is a narrower and younger platform than a standard x86 CUDA 12 box, so package selection and ABI matching matter more than usual — the wheel ecosystem for aarch64 + CUDA 13 is still filling in.

When to Use This Skill

  • Setting up a fresh Spark box for training or inference.
  • Hitting an import error mentioning libcudart, a missing symbol, or a wheel that "installed fine but won't load."
  • A framework install (PyTorch, Unsloth, TRL, vLLM, xformers) fails, hangs, or silently falls back to CPU.
  • Deciding whether to use an NGC container or bare pip.
  • Restoring a working setup after an OS reinstall or a base-image update, needing to re-verify from scratch.

Each of these accepts the same general fix: match the container/wheel combination to CUDA 13 and SM121, don't fight the ABI.

Container-First Rule

Quick decision, before the detail below:

  • Standard training/inference work → NGC PyTorch container.
  • Unsloth-centric fine-tuning → Unsloth container (it ships the pinned Triton/xformers/transformers combination already validated for that path).
  • Neither fits (custom system package, local IDE interpreter) → bare pip, following the exact sequence further down.

Default to a container. Use nvcr.io/nvidia/pytorch:25.09-py3 as the base for general work — the newest tag confirmed working on this hardware; pull a newer blessed tag if locally available rather than hard-blocking on 25.11-py3. NGC's tag is dated, so running it directly is fine:

docker run --runtime=nvidia --gpus all -it --rm \
  nvcr.io/nvidia/pytorch:25.09-py3

unsloth/unsloth:dgxspark-latest is a moving tag by contrast — resolve and pin its digest before running it for anything reproducible; the bare tag is a discovery step only, not the default invocation. Full pull-inspect-pin sequence and flag rationale/volume mounts for finetuning/ run dirs: references/container-workflow.md. Treat bare pip as the exception.

Read the full file on GitHub · 201 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 201 lines · 76 tokens per session scan A 4fe4b4328a52

Subscribe to this mod's changes

spark-environment-setup is a skill published in the GitHub repository wshobson/agents (39,424 stars, last pushed 3d ago), licensed MIT. It adds 76 tokens to every session and 2,086 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

amc-run-rtsp-calibration

Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.

NVIDIA/skills · 59 tokens

deepstream-generate-pipeline

Build DeepStream GStreamer pipelines interactively. Use when the user asks about pipelines for video/image inference, detection, tracking, or streaming — including natural phrases like 'pipeline to infer on image', 'run inference on video', 'detect objects in stream', 'save inference output', 'deepstream pipeline'…

NVIDIA/skills · 108 tokens

jetson-inference-mem-tune

Pick the serving stack and per-runtime memory flags (vLLM, SGLang, llama.cpp, TensorRT Edge-LLM) for an LLM/VLM workload on any NVIDIA Jetson.

NVIDIA/skills · 50 tokens

deepstream-import-vision-model

Use this skill to bring a supported object-detection vision model from HuggingFace or NVIDIA NGC into an NVIDIA DeepStream pipeline with end-to-end automation: ONNX download, SafeTensors export, TRT engine build, custom nvinfer bbox parser, multi-stream benchmark, and PDF report. Object detection models only.

NVIDIA/skills · 72 tokens

jetson-package

Pick Jetson-compatible containers, vLLM runtime images, and Jetson AI Lab PyPI indexes; maps Orin SM 8.7 vs Thor SM 11.0 and JetPack-specific package choices.

NVIDIA/skills · 47 tokens