spark-environment-setup
Has your agent set up an environment for training artificial intelligence models on specific hardware.
What it does
This tool helps set up your computer (DGX Spark) to run AI programs that use graphics (like PyTorch). It ensures the right program parts work together correctly.
When to use it
- ✓When installing AI programs for the first time on DGX Spark.
- ✓When an AI program gives an error on startup or when using the graphics card.
- ✓When deciding whether to use a pre-made package (container) or install everything manually.
Example of what to ask your AI
“How do I set up my DGX Spark to run PyTorch without errors?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It checks if programs (like PyTorch, Unsloth) are compatible with your DGX Spark's CUDA version (the graphics card system). It recommends using a 'container' (ready-made package) or following an exact command list for installation.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add wshobson/agents --skill spark-environment-setupOr download just the file:
curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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.
The reason for the container-first stance is pinning, not convenience. Triton, xformers, and transformers versions interact narrowly with GB10's SM121 target and CUDA 13; a container locks all of them together against a combination already validated on this hardware. Bare pip leaves that resolution to you, one broken import at a time.
When bare pip is warranted, follow the NVIDIA playbook's install sequence verbatim and in order:
pip install "transformers==5.13.1" "peft==0.19.1" "hf_transfer==0.1.9" "datasets==4.3.0" "trl==1.8.0"
pip install --no-deps "unsloth==2026.7.2" "unsloth_zoo==2026.7.2" "bitsandbytes==0.49.2"
pip install -U "torchao==0.17.0"
The second command's --no-deps flag is not optional —
letting pip re-resolve Unsloth's dependency tree on aarch64 is
a common way to pull in an incompatible torch or triton build.
The third line is not optional either: the NGC base image's
bundled torchao is too old for current peft's LoRA-attach
path (ImportError: ... torchao ... only versions above 0.16.0 are supported) — a hard blocker, not a warning. Every == pin
above is load-bearing, taken from the dated known-good version
matrix in references/stack-matrix.md (its Last verified date
governs staleness) — an unpinned install resolves current PyPI
versions well outside what this Unsloth release supports.
Pull a fresh tag when a new blessed release is announced.
Rebuild locally from one of the two bases only when a project
needs an extra system package layered in — not to "upgrade" a
component the image already pins. Details on both paths:
references/container-workflow.md.
One more preflight: official DGX Spark playbooks have shipped
broken before. Check recent issues on
github.com/NVIDIA/dgx-spark-playbooks (and the other
resources in references/stack-matrix.md) before trusting a
recipe verbatim for a long run.
The ABI Rule
The single most common failure on Spark is a CUDA 12/13 ABI
mismatch: a wheel built against libcudart.so.12 loaded on a
system that only has libcudart.so.13. The install usually
succeeds; the failure surfaces later as a missing-symbol error
or a segfault that doesn't obviously point at CUDA.
Fix: pull wheels from download.pytorch.org/whl/cu130 (the
cu130-tagged aarch64 builds), or use one of the containers
above, which already carry a matched build. Before chasing a
…
FAQ
What is a 'container'?
It's like a ready-made box with all the necessary programs and settings to run something specific, avoiding compatibility issues.
What is an 'ABI mismatch'?
It's when two program parts expect different versions of a fundamental library (like CUDA), causing errors.
Why is using a container better?
Because it ensures all parts (PyTorch, CUDA, etc.) have been tested together and work well on your DGX Spark, preventing compatibility headaches.
Details
Original description by the author
Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.
repo: wshobson/agents
Popularity
- GitHub stars
- 41k
- Ranking position
- #4852
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
screen-reader-testing
Has your agent test websites using screen readers to ensure they are accessible.
wshobson/agents
wcag-audit-patterns
Helps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
wshobson/agents
multi-reviewer-patterns
Enables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
wshobson/agents
parallel-debugging
Allows the agent to debug complex issues with parallel investigations and root cause analysis.
wshobson/agents
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC