sglang-miles branch, not a release tag, and the training side pins torch 2.11.0 (an FSDP monkey patch is version-gated
on it). A future update will upgrade the training stack to torch 2.13.
Use Docker unless you have a reason not to.
Method 1: Docker (recommended)
latest carries the sglang-miles tip as of its last build, and is rebuilt when docker/Dockerfile or
requirements.txt changes on main (or on a manual dispatch); dated tags
(dev-cu129-sglang-main-YYYYMMDD) pin a specific build. CUDA 12.9 is the only supported
build — the Dockerfile carries a CUDA 13 recipe in a comment, but its sglang-kernel pin is
hardcoded to cu129 and no CI covers it.
Build it yourself
Run
- PyTorch 2.11.0 and the sglang base image’s CUDA stack
- sglang built from the
sglang-milesbranch (/sgl-workspace/sglang, editable) withsglang.multimodal_gen - FlashAttention-3 (
flash_attn_interface),sglang-kernel==0.4.5,torch_memory_saver==0.0.9 diffusers,peft,transformers,ray,wandb, andltx-corefromrequirements.txt- miles_diffusion installed editable at
/root/miles_diffusion - PaddleOCR’s English det/rec/cls weights pre-downloaded (the OCR reward would otherwise race-download them at runtime)
nccl-testsbinaries onPATHfor link diagnostics
Method 2: Update an existing container
If you already run the image and want the latest code:Method 3: Bare metal, from source
expected-absent instead of flagging.
The installer has six idempotent steps, and --from STEP resumes a failed run. The last step diffs every installed
package against the snapshot of one image tag (OFFICIAL_IMAGE in snapshot/pins.env, refreshed by hand with
refresh.sh, so it can lag latest) — a clean run reports mismatched 0 missing 0 and ends with
environment matches the official image; the matched and expected-absent counts depend on the snapshot
and on which apt-sourced dists the host provides.
To check an existing machine against the image without installing anything:
python3 .claude/skills/install-miles-diffusion/verify_env.py.
Plain pip install -r requirements.txt && pip install -e . --no-deps is not enough on its own:
requirements.txt has no sglang, and miles.utils.arguments imports sglang.multimodal_gen at load. Adding
sglang the way CI’s CPU job does (sglang-miles installed --no-deps, plus tests/ci/requirements-ci-cpu.txt
and the CPU stubs) leaves a trainer-only environment: CPU tests run, but RL does not, and neither does MiniMax H3 SFT, whose
encoder calls sglang’s FA3 kernel — the engine’s GPU kernels and FlashAttention-3 are not part of that install. Resolving the full set through
pip is not possible (it is only consistent under --no-deps replay), which is what the
installer handles.
Verify
uv pip install tests/ci/cpu_stubs.
Hardware
Under
--colocate the training actor and the rollout engines time-share the same GPUs,
so the floor is set by whichever of the two needs more memory, not by their sum.
Environment variables
Next
- Launch Scripts — what a launch script does and how to override a recipe.
- CLI Reference — every flag.

