sparkrun is a community CLI for launching and managing inference workloads on one or more DGX Spark systems. It handles recipe-driven deployment, model and container distribution across nodes, multi-node tensor-parallel setup, and post-launch readiness checks — replacing the manual SSH + docker run + hf download cycle on each node. The sparkrun Recipe Reference documents all recipe fields used below.
Case A: eugr vLLM recipe
The eugr/spark-vllm-docker repo provides recipes and launch scripts for running vLLM on DGX Spark. The example below is based on eugr’s openai-gpt-oss-120b recipe using the MXFP4 build.
Before:
recipe_version: "1"
container: vllm-node-mxfp4
solo_only: true
build_args:
- --exp-mxfp4
defaults:
gpu_memory_utilization: 0.8
max_num_batched_tokens: 8192
env:
VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8: "1"
command: |
vllm serve openai/gpt-oss-120b \
--tool-call-parser openai \
--reasoning-parser openai_gptoss \
--enable-auto-tool-choice \
--gpu-memory-utilization {gpu_memory_utilization} \
--enable-prefix-caching \
--load-format fastsafetensors \
--quantization mxfp4 \
--mxfp4-backend CUTLASS \
--mxfp4-layers moe,qkv,o,lm_head \
--attention-backend FLASHINFER \
--kv-cache-dtype fp8 \
--max-num-batched-tokens {max_num_batched_tokens} \
--host {host} \
--port {port}
After:
recipe_version: "1"
model: openai/gpt-oss-120b
runtime: vllm-distributed
container: vllm-node-mxfp4
solo_only: true
build_args:
- --exp-mxfp4
defaults:
gpu_memory_utilization: 0.8
max_num_batched_tokens: 8192
host: 0.0.0.0
port: 8000
env:
VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8: "1"
command: |
vllm serve {model} \
--tool-call-parser openai \
--reasoning-parser openai_gptoss \
--enable-auto-tool-choice \
--gpu-memory-utilization {gpu_memory_utilization} \
--enable-prefix-caching \
--load-format fastsafetensors \
--quantization mxfp4 \
--mxfp4-backend CUTLASS \
--mxfp4-layers moe,qkv,o,lm_head \
--attention-backend FLASHINFER \
--kv-cache-dtype fp8 \
--max-num-batched-tokens {max_num_batched_tokens} \
--host {host} \
--port {port}
- Add
model:so sparkrun has the model identifier used for features such as model pre-sync and VRAM estimation. - Add
hostandporttodefaults:because they are referenced by the command template. In the original eugr workflow these values are supplied by its launcher; here they are defined explicitly in the sparkrun recipe. - Set
runtime: vllm-distributedexplicitly. sparkrun can auto-detect it from thevllm serveprefix incommand:, but explicit is clearer and prevents runtime selection from being inferred from legacy eugr builder fields. Usevllm-rayfor Ray-based execution instead. - Replace the hardcoded model name with
{model}incommand:— enables pre-sync and VRAM tools. solo_onlyis retained for legacy recipes but deprecated; usemax_nodes: 1in new v2 recipes.
Case B: vllm/vllm-openai from Docker Hub
The official vLLM Docker image (docs, Dockerfile) defines ENTRYPOINT ["vllm", "serve"]. Because sparkrun supplies its own launch script, the entrypoint needs to be cleared with executor_config: entrypoint: "" so the script is not interpreted as an argument to vllm serve.
Before:
docker run -d --gpus all -p 8000:8000 \
vllm/vllm-openai:latest \
--model openai/gpt-oss-120b \
--host 0.0.0.0 --port 8000
After:
recipe_version: "2"
model: openai/gpt-oss-120b
runtime: vllm-distributed
container: vllm/vllm-openai:latest
executor_config:
entrypoint: ""
defaults:
host: 0.0.0.0
port: 8000
command: |
vllm serve {model} --host {host} --port {port}
- Add
executor_config: entrypoint: ""— clears the image’sENTRYPOINT ["vllm", "serve"]so sparkrun’s serve script runs directly instead of being passed as arguments tovllm serve. - Add
model:,host,port,runtime— same as Case A. - This example uses sparkrun’s native
vllm-distributedruntime rather than the Ray-basedvllm-rayruntime.
SGLang
runtime: sglang uses SGLang’s native distributed coordination (--dist-init-addr, --nnodes, --node-rank), no Ray. Auto-detected from the python3 -m sglang.launch_server prefix in command:.
The original command below comes from the SGLang Muse-Glimmer cookbook and was also verified on DGX Spark.
Before:
docker run -d --name muse-glimmer \
--gpus all --ipc host --shm-size 64G \
-p 8000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
lmsysorg/sglang:dev-muse-glimmer \
python3 -m sglang.launch_server \
--model-path meta-models/Muse-Glimmer-30B \
--reasoning-parser muse \
--tool-call-parser muse \
--speculative-algorithm DFLASH \
--speculative-draft-model-path meta-models/Muse-Glimmer-30B-assistant \
--mem-fraction-static 0.65 \
--host 0.0.0.0 --port 30000
After:
recipe_version: "2"
model: meta-models/Muse-Glimmer-30B
runtime: sglang
container: lmsysorg/sglang:dev-muse-glimmer
max_nodes: 1
defaults:
port: 30000
host: 0.0.0.0
gpu_memory_utilization: 0.65
speculative_algorithm: DFLASH
speculative_draft_model_path: meta-models/Muse-Glimmer-30B-assistant
command: |
python3 -m sglang.launch_server \
--model-path {model} \
--reasoning-parser muse \
--tool-call-parser muse \
--speculative-algorithm {speculative_algorithm} \
--speculative-draft-model-path {speculative_draft_model_path} \
--mem-fraction-static {gpu_memory_utilization} \
--host {host} \
--port {port}
- Add
model:,host,portindefaults:,runtime— same as Cases A/B. recipe_version: "2"— sparkrun’s current format. eugr recipes use v1 (legacy, accepted). New recipes should use v2.- No
executor_configneeded — officiallmsysorg/sglangimages haveCMD ["/bin/bash"]and no ENTRYPOINT, so sparkrun’s serve script runs without conflict. - sparkrun manages GPU access (
--gpus), networking (--network host,--ipc host), shared memory (--shm-size), and memory limits (--memory; override with--memory-limiton CLI). - It handles image distribution and model pre-sync across nodes. For speculative decoding, it detects
speculative_draft_model_pathindefaults:and ships the draft model to all nodes automatically. - NCCL setup and InfiniBand detection are configured automatically for multi-node workloads.
- After launch, sparkrun performs a readiness check (port + HTTP
/v1/models) before detaching.
Thanks to @eugr_nv for the spark-vllm-docker repo and recipes, and the sparkrun crew for sparkrun.