Method 1: Docker (recommended)
- NVIDIA
- AMD
- PyTorch (matching the container’s CUDA / ROCm version)
- Megatron-LM, SGLang, FlashAttention-3, DeepGEMM, Apex
- Ray, uv, and Miles installed editable at
/root/miles
Method 2: pip (FSDP and torchtitan)
Every tagged release after the v0.2 line publishes a pure-Pythonmiles wheel to a pip index at
https://radixark.github.io/miles-wheels/simple/, next to the sglang wheel it was tested with, which
it depends on. Linux x86_64 or aarch64, Python 3.11 or 3.12.
PyPI has an unrelated project named miles, and pip gives every index equal weight, so install
with uv, which takes each package from the first index that has it:
sglang:
[torchtitan]adds torchtitan and its torch floor; leave it off for FSDP alone. torch itself follows SGLang’s pin.- Megatron-LM is not installable this way:
--train-backend megatronneeds the Docker image. True-on-policy sampling-support replay also needs the image for now (it relies on FlashAttention-3 and the Miles router build).
train.py (Quick Start);
the wheel supplies the miles package it imports. The Miles dashboard is not in the wheel: install it
from the same checkout with pip install -e packages/miles-dashboard.
Method 3: From source
Clone and install in an existing environment.Method 4: Update an existing container
If you already run a Miles image and want the latest code:Verify
Confirm Miles imports and the GPUs are visible:Hardware requirements
For multi-node training you also need a high-bandwidth interconnect — InfiniBand, RoCEv2,
or Slingshot — and 200+ GB/s per node. Single-node jobs run fine over NVLink only.
Next steps
- Quick Start — run your first training job.
- Core concepts — the mental model behind Miles.
- Training backends — Megatron vs FSDP.

