wshobson/agents

spark-environment-setup

Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13).

  • SKILL.md 已保存
  • 英文来源资料
  • 安装与运行未实测
先判断是否解决你的问题

spark-environment-setup 是什么?

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.

以上为来源原文,中文用途说明尚待整理。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 spark-environment-setup,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 spark-environment-setup

请在 Codex 的当前工作环境中安装并检查 spark-environment-setup 这个 Skill。

项目身份:wshobson/agents / spark-environment-setup
来源:https://github.com/wshobson/agents/blob/91ff75307f5668916f3eb77d5ba556266c961376/plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md
已定位的源文件:plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-22T03:34:45.756Z
中文使用说明
尚待整理,保留英文来源内容
安装与任务测试
本站未执行安装或任务测试
来源复核
已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料

plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md · 抓取时间 2026-11-22T03:34:45.756Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

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.

查看源文件章节 / Source sections
  • 原文:Spark Environment Setup
  • 原文:When to Use This Skill
  • 原文:Container-First Rule
  • 原文:The ABI Rule
  • 原文:Component Quick Table
  • 原文:Verification Commands
  • 原文:Next Steps
原文: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: ```bash 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: ```bash 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 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 stack trace that mentions a CUDA symbol, check which CUDA tag the installed wheel was built against: ```bash python3 -c "import torch; print(torch.version.cuda)" ``` If that output doesn't start with `13`, the ABI mismatch is the first thing to fix. NGC container builds (e.g. `nvcr.io/nvidia/pytorch:25.09-py3`) build torch internally against CUDA 13 with no `+cu130` wheel tag — `pip show torch` won't say `cu130` there, and that absence alone is not a failure. Typical symptoms: - `ImportError: undefined symbol` referencing a CUDA runtime function. - A segfault on the first `.cuda()` call, no useful traceback. - A wheel that installs cleanly, then fails at import time — pip's resolver doesn't check CUDA ABI, only version constraints. - Two "identical" environments behaving differently — usually one has a cu130 wheel, the other a cu121/cu124 leftover. The fix is the same regardless of symptom: match the wheel's CUDA tag to the system, or use a container that already does.

原文:Component Quick Table

Condensed status for the components most likely to come up. Full table with wheel URLs, build flags, the sm_121 vs sm_121a distinction, and the dated known-good version matrix: `references/stack-matrix.md`. | Component | Status | |---|---| | PyTorch | ✅ official cu130 aarch64 wheels | | bitsandbytes | ✅ works out of the box | | Triton | ✅ needs the `TRITON_PTXAS_PATH` parameter set | | flash-attn | ❌ skip pip build; NGC bundles a working one — see `spark-training-gotchas` G2 | | xformers | source build only (`TORCH_CUDA_ARCH_LIST=12.1`) | | vLLM | nightly wheels only | | TransformerEngine / NVFP4 train | container-only | Everything else — Unsloth, Axolotl, TRL, PEFT — installs cleanly through the container-first path above. LLaMA-Factory and NeMo are fragile on Spark; check upstream issues first.

原文:Verification Commands

Confirm the environment can actually see the GPU before running anything expensive: ```python import torch print(torch.cuda.is_available(), torch.version.cuda) ``` This call returns two values; the exact output format is one line, `<bool> <cuda-version>`: ```text True 13.0 ``` If it prints `False` instead, don't jump straight to a wheel reinstall — ABI mismatch is one cause among several: | Hypothesis | Quick check | |---|---| | Runtime/flags | `nvidia-smi` fails in-container too | | Device visibility | `echo $CUDA_VISIBLE_DEVICES` | | Permissions | `ls -l /dev/nvidia*` | | CUDA init state | wedged process; retry fresh shell/container | | ABI mismatch (usual culprit) | `torch.version.cuda` not `13.x` | Check `nvidia-smi` first — if it doesn't show the GPU, it's one of the first three, not ABI. Reinstall a wheel only once ABI is confirmed. Per-hypothesis detail: `references/stack-matrix.md`. Run right after the container starts, before installing project-specific packages. One more check: if Triton kernel compilation fails once training starts, set `TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas` and retry — see `references/stack-matrix.md` for the full workaround list.

文件 SHA256:4fe4b4328a52dae83b2224c577ad29abc499215cd15e987f8255d33b1ca5e55f

仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。

SKILL.md原文description · 2026-11-22T03:34:45.756Z

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.

查看历史简介来源

历史收录数据

来源仓库wshobson/agents
Skill源路径plugins/dgx-spark-ops/skills/spark-environment-setup/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源