Agent skill

Install Miles Diffusion

by radixark in radixark/miles_diffusion

Fallback installer for milesdiffusion on a bare CUDA 12.9 Linux GPU box, reproducing the official radixark/milesdiffusion image's package versions and verifying them.

Apache-2.0Auto-check passedDevOps & Cloud

Install Install Miles Diffusion

skills CLI
$ npx skills add radixark/miles_diffusion --skill install-miles-diffusion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install radixark/miles_diffusion install-miles-diffusion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/radixark/miles_diffusion.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/install-miles-diffusion .claude/skills/install-miles-diffusion && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
install-miles-diffusion
GitHub stars
107
Token cost
~1.6k tokens
SKILL.md length
736 words
Files
8
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fallback installer for milesdiffusion on a bare CUDA 12.9 Linux GPU box, reproducing the official radixark/milesdiffusion image's package versions and verifying them.

  • Tasks that involve Containers
  • SKILL.md covers Files, Run, Why it replays instead of… and sglang and miles are anchored…, plus 3 more sections
  • Runs Shell and Python scripts from its folder; calls pip, apt-get and git; needs HF_TOKEN

What it does

Install Miles Diffusion is an agent skill from radixark/miles_diffusion. Fallback installer for milesdiffusion on a bare CUDA 12.9 Linux GPU box, reproducing the official radixark/milesdiffusion image's package versions and verifying them. Docker is the supported way to run milesdiffusion and this is not recommended — use it only when the image cannot be pulled, or to check whether a machine's env still matches the image.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `install.sh`, `refresh.sh` and `verify_env.py`).

It sits in DevOps & Cloud, covering Containers. It works with Docker, CUDA, Linux and SGLang. The repository describes itself as: Miles-diffusion is an post-training framework for large-scale diffusion model training and production workloads, forked from and co-evolving with miles. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Containers

Example prompts

  • “/install-miles-diffusion”

Requirements

  • Python 3
  • A Bash shell
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit c7d3b0d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell and Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • apt-get
    • git
    • bash
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Install Miles Diffusion loads about 1.6k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 736 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from radixark/miles_diffusion at commit c7d3b0d, republished under its Apache-2.0 licence (© radixark). 736 words, ~1,553 tokens.

Download SKILL.mdSave it as .claude/skills/install-miles-diffusion/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
install-miles-diffusion
description
Fallback installer for miles_diffusion on a bare CUDA 12.9 Linux GPU box, reproducing the official radixark/miles_diffusion image's package versions and verifying them. Docker is the supported way to run miles_diffusion and this is not recommended — use it only when the image cannot be pulled, or to check whether a machine's env still matches the image.

install-miles-diffusion

Docker is the official way to run miles_diffusion — pull OFFICIAL_IMAGE and use it. This skill is a fallback for machines that cannot, and it is not recommended: it reconstructs the image's package set, it is not the image. deep_ep and flash_mla cannot be reproduced at all, and every apt-sourced dist depends on the host being Ubuntu 24.04.

Reproduces the official Docker environment on a box that has only CUDA 12.9 and Ubuntu 24.04. The target is not "an env that works" but "the image's env": snapshot/ is a capture of OFFICIAL_IMAGE, install.sh replays it, and verify_env.py fails if the result drifts.

Files

snapshot/packages.txtthe image's pip freeze; #skip[reason] marks what we don't install
snapshot/apt.txtthe apt packages install.sh needs
snapshot/pins.envpins pip can't express — image tag, sglang/miles branch and commit, indexes
snapshot/kernels.lockthe image's resolved FA3 kernel hashes
install.shsix steps: apt, pip, packages, sglang, miles, verify
verify_env.pyper-package diff against packages.txt; non-zero exit on drift
refresh.shre-capture snapshot/ when the image moves

Run

A bare CUDA image has no git, and some clusters hand out a resolver that can't answer for outside names:

bash
grep -q nameserver /etc/resolv.conf || echo "nameserver 8.8.8.8" >> /etc/resolv.conf
apt-get update -qq && apt-get install -y --no-install-recommends git ca-certificates
git clone https://github.com/radixark/miles_diffusion.git && cd miles_diffusion
bash .claude/skills/install-miles-diffusion/install.sh

~20 min cold, ~4 with a warm pip cache. Run it in the background and poll the log. --from STEP resumes; every step is idempotent. To check an existing box instead: python3 .claude/skills/install-miles-diffusion/verify_env.py.

Why it replays instead of resolving

The image does not satisfy its own dependency metadata — pip check there reports ~20 violations, because sglang is installed --no-deps from a commit newer than the base image's package set, and nvidia-modelopt wants setuptools>=80 against a pinned 70.2.0. Resolving the freeze returns ResolutionImpossible, and any relaxation that resolves lands on versions the image does not have. So install.sh installs packages.txt with --no-deps.

Two packages cannot be reproduced at all: deep_ep and flash_mla are compiled inside lmsysorg/sglang and published nowhere. Neither is on a miles_diffusion import path.

flash_attn_3 comes from a wheel the image installs from a local copy, so pip freeze reports an unresolvable file:// path. refresh.sh rewrites it to the release asset the Dockerfile pulls from (FA3_WHEELS_REPO / FA3_WHEELS_TAG), so pip installs it like any other pin.

sglang and miles are anchored to the refs the Dockerfile builds from

sglang comes from the sglang-miles-h3 integration branch and miles from main, as in the Dockerfile (SGLANG_DIFFUSION_BRANCH=sglang-miles-h3, MILES_DIFFUSION_COMMIT=main). The difference is that the Dockerfile follows the branch tip at build time while this pins a commit and checks it is an ancestor of the branch. That check matters: the first capture pinned a local cherry-pick that exists in no remote.

Because the ancestor check needs real history, the checkout is a blob-filtered full clone rather than the image's --depth=1, so setuptools_scm reports a different commit count for the same sha; verify_env.py compares sglang and miles by presence, not by that string.

Show full SKILL.md (273 more words)Show less

Refreshing the snapshot

bash
bash .claude/skills/install-miles-diffusion/refresh.sh <devbox-on-the-new-image>

Capture from a box running the image itself, not from whichever tag a devbox happens to be on — the first snapshot here was taken from a devbox two image releases behind, which pinned diffusers 0.37.0 against a repo that had moved to 0.38.0.

A devbox people have worked on is also not a pristine image. refresh.sh guards both drift classes it has hit: the sglang commit comes from setuptools_scm rather than git rev-parse HEAD, and packages dated after the image's build day are marked #skip[capture-drift]. If the box ran :latest, replace OFFICIAL_IMAGE with the concrete tag it resolved to.

What goes wrong

  • "Cannot uninstall X, RECORD file not found" — apt dists have no RECORD. step_pip pre-seeds pip, PyJWT and wheel with --ignore-installed; a fourth needs the same flag.
  • "Device or resource busy" on a file in /usr/local/bin — the host mounted a binary read-only there (rx devboxes do this for uv, gh, claude). step_packages drops the matching packages and verify treats them as expected absences.
  • Not Ubuntu 24.04 — the apt-sourced python dists then come from different pockets and verify reports drift on them.

Running SD3 after install

bash
export HF_TOKEN=...              # SD3.5 is gated
export NCCL_NVLS_ENABLE=0        # partial-node containers have no IMEX multicast capability
python3 scripts/run_diffusion_grpo_sd3_ocr_sglang.py --cuda-visible-devices 0,1

Without NCCL_NVLS_ENABLE=0, execute_train enables NVLink SHARP whenever it sees NVLink and NCCL dies in FSDPTrainRayActor.init with Failed to bind NVLink SHARP (NVLS) Multicast memory. On a fresh HF cache the SD3.5 download pulls both model.safetensors and model.fp16.safetensors for the CLIP encoders; sglang's fast loader refuses the duplicate tensor names, logs a traceback and falls back to the native loader. The run continues.

Verified on nvidia/cuda:12.9.1-cudnn-devel-ubuntu24.04, 4×H100, no python preinstalled: 369 matched / 0 mismatched / 0 missing, then a completed GRPO step of the SD3 recipe.

© radixark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files in .claude/skills/install-miles-diffusion of radixark/miles_diffusion.

  • SKILL.md
  • install.sh
  • refresh.sh
  • snapshot/apt.txt
  • snapshot/kernels.lock
  • snapshot/packages.txt
  • snapshot/pins.env
  • verify_env.py

Open the folder on GitHubat commit c7d3b0d

Compare with similar skills

Install Miles Diffusion next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Install Miles Diffusion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Install Miles Diffusion this skillradixark/miles_diffusion107—~1.6kAutomated safety check: PassApache-2.0
Tao Setup Nvidia GPU HostNVIDIA/skills3.5k—~3.4kAutomated safety check: NotesApache-2.0
Migrate Workflow Ec2 To Osdcpytorch/test-infra113—~2kAutomated safety check: PassCustom licence
Swig CI Reproswig/swig6.3k—~1.2kAutomated safety check: PassCustom licence
Docker Jfr Benchmark Loopeclipse-rdf4j/rdf4j420—~945Automated safety check: PassBSD-3-Clause
.NET Crash Dump Collectiondotnet/skills5.6k2 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    Host setup for TAO GPU backends. An agent skill from NVIDIA/skills.

    3.5k GitHub stars~3.4k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Step-by-step playbook for migrating a pytorch/pytorch .github/workflows/.yml from EC2 to OSDC (ARC) runners — covers both dial-up and 100% opt-in patterns, with the inputs that must be plumbed…

    113 GitHub stars~2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Swig CI Repro

    swig/swig

    Reproduce a GitHub Actions Linux CI failure locally when it does not happen on your machine: a podman/docker image that mirrors the ubuntu-22.04 runner by reusing the real Tools/CI-linux-.sh install…

    6.3k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Docker Jfr Benchmark Loop

    eclipse-rdf4j/rdf4j

    Run a repeatable RDF4J performance loop against one JMH benchmark in Docker with Linux Java 26 and JFR CPU-time profiling.

    420 GitHub stars~945 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Official

    Configures automatic crash dumps or captures dumps from running processes for modern .NET apps on Linux, macOS and Windows, including Docker and Kubernetes.

    5.6k GitHub starsUsed in 2 repos~1.1k tokens
    DevOps & CloudAuto-check passed
  • Minimega

    sandia-minimega/minimega

    This skill should be used when the user asks how to configure, run, automate, integrate, or troubleshoot minimega (VMs, namespaces, VLANs, clusters, miniccc, miniweb, command socket or Python API…

    160 GitHub stars~3.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed

Categories

Questions about Install Miles Diffusion

What does Install Miles Diffusion do?

Fallback installer for milesdiffusion on a bare CUDA 12.9 Linux GPU box, reproducing the official radixark/milesdiffusion image's package versions and verifying them. Install Miles Diffusion is an agent skill from radixark/miles_diffusion.9 Linux GPU box, reproducing the official radixark/milesdiffusion image's package versions and verifying them.

When should I use Install Miles Diffusion?

Install Miles Diffusion fits situations like: tasks that involve Containers.

How do I install Install Miles Diffusion in Claude Code?

Run `npx skills add radixark/miles_diffusion --skill install-miles-diffusion -a claude-code`. Or copy the skill folder (.claude/skills/install-miles-diffusion in radixark/miles_diffusion) into .claude/skills/install-miles-diffusion in your project. Claude Code loads it when a task matches its description.

How do I install Install Miles Diffusion in Codex?

Run `npx skills add radixark/miles_diffusion --skill install-miles-diffusion -a codex`. Or copy the skill folder (.claude/skills/install-miles-diffusion in radixark/miles_diffusion) into .agents/skills/install-miles-diffusion in your project. Codex loads it when a task matches its description.

Can I use Install Miles Diffusion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add radixark/miles_diffusion --skill install-miles-diffusion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/install-miles-diffusion, .gemini/skills/install-miles-diffusion, .github/skills/install-miles-diffusion and .opencode/skills/install-miles-diffusion in your project.

What does Install Miles Diffusion need to run?

Going by SKILL.md and its folder, Install Miles Diffusion needs a shell and Python for the scripts in its folder, the command-line tools its instructions call (pip, apt-get, git, bash and python3) and credentials named HF_TOKEN. Our summary lists: Python 3; A Bash shell; Docker.

Does Install Miles Diffusion access the network?

SKILL.md contains no URLs. Its commands use pip and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Install Miles Diffusion safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Install Miles Diffusion use?

Install Miles Diffusion is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Install Miles Diffusion use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Install Miles Diffusion?

Skills that share tags, products or a category with Install Miles Diffusion: Tao Setup Nvidia GPU Host (NVIDIA/skills, 3.5k stars), Migrate Workflow Ec2 To Osdc (pytorch/test-infra, 113 stars), Swig CI Repro (swig/swig, 6.3k stars) and Docker Jfr Benchmark Loop (eclipse-rdf4j/rdf4j, 420 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Install Miles Diffusion?

radixark (a GitHub organization) maintains it in radixark/miles_diffusion, which has 107 GitHub stars. The repository was last updated on October 7, 2026.

Source: radixark/miles_diffusion on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.