vllm-spark-launcher is a Rust CLI for launching vLLM/SGLang containers across DGX Spark GPU clusters via SSH. The current SGLang support is incomplete — it only changes the engine name but uses identical docker commands as vLLM. SGLang has different defaults and CLI flags that need proper handling.
Current gaps:
VLLM_HOST_IP is always set — SGLang uses SGLANG_WORKER_IP instead--tp, --dp, --pp vs vLLM's --tensor-parallel-size)r1. Add distributed_backend field to Recipe struct
distributed_backend: String with default "mp" (matches current behavior)"mp" (default), "ray"build_docker_commandr2. Add distributed_backend to recipe TOML schema
distributed_backend = "mp" (or "ray")--tensor-parallel-size=<nnodes> + RAY_ADDRESS env var on worker nodes--tensor-parallel-size=1 + --pipeline-parallel-size + --nnodes + --node-rank + --master-addr + --distributed-executor-backend=mpr6. Update build_docker_command for Ray/MP backend switch
distributed_backend == "ray":
--tensor-parallel-size=<nnodes>--tensor-parallel-size=<nnodes> + RAY_ADDRESS=<head_ip> env var--nnodes, --node-rank, --master-addr, --pipeline-parallel-size, --distributed-executor-backend flagsdistributed_backend == "mp" (current behavior):
--tensor-parallel-size=1 + --pipeline-parallel-size=<computed> + --nnodes + --node-rank + --master-addr + --distributed-executor-backend=mpEnvironment variable changes:
"vllm": set VLLM_HOST_IP"sglang": set SGLANG_WORKER_IP (instead of VLLM_HOST_IP)r4. Implement doctor subcommand (checks node readiness + container state)
docker --version, nvidia-smi, NCCL env var validationdocker ps --filter label=spark-launcher, engine health endpoints, Ray cluster statusr5. Implement --repair flag (builds .repaired image on head node)
<image>.repaired on head node, tags itserve auto-detects and prefers <image>.repaired if it existsr3. Wire up doctor handler in main()
r7. Update serve() to prefer repaired images
<image>.repaired existsr8. Integration testing
cargo build succeeds--recipe glm51 -d shows correct flags for both enginesdistributed_backend = "ray" shows Ray-specific flagsr9. Update AGENTS.md
| File | Changes |
|---|---|
src/main.rs |
Recipe struct, distributed_backend, env var logic, build_docker_command rewrite, doctor handler, repair handler |
recipes/*/recipe.toml |
Add distributed_backend field (optional, defaults to mp) |
AGENTS.md |
Document new fields, commands, SGLang behavior |
write_file on src/main.rs — accidentally wiped it before. Always use patch() for incremental changes.E0670 async fn not permitted) — ignore, Cargo.toml uses edition 2024.--tp/--dp/--pp vs --tensor-parallel-size/--pipeline-parallel-size.