Selaa lähdekoodia

revert generic PORT injection; PORT is an explicit recipe [env] again

Operator: injecting PORT into every container is ugly/implicit. The
recipe [env] table is the existing explicit mechanism (renders -e
KEY=VAL) — put PORT=8000 back into the two sparkring recipes (their
serve-with-warmup wrapper polls 127.0.0.1:$PORT) and drop the
launcher-wide pair. Stock recipes get no PORT env at all. Gates green
(275 tests).
Alexander Korolev 1 kuukausi sitten
vanhempi
sitoutus
bd82f6f9ae

+ 3 - 0
recipes/glm53-flash-sparkring-2x/recipe.toml

@@ -102,6 +102,9 @@ VLLM_WORKER_MULTIPROC_METHOD = "spawn"
 VLLM_DISABLED_KERNELS = "MarlinFP8ScaledMMLinearKernel"
 PYTHONDONTWRITEBYTECODE = "1"
 LD_PRELOAD = "/opt/sparkring/nccl-pci/libnccl.so.2.30.7"
+# The serve-with-warmup wrapper polls the API at 127.0.0.1:$PORT — must
+# match `port` above (the launcher only passes --port as a CLI flag).
+PORT = "8000"
 SERVED_MODEL_NAME = "GLM-5.3-Flash-NVFP4-Spark"
 DFLASH_WARMUP = "1"
 DFLASH_WARMUP_CONCURRENCIES = "1"

+ 3 - 0
recipes/glm53-flash-sparkring-4x/recipe.toml

@@ -116,6 +116,9 @@ VLLM_WORKER_MULTIPROC_METHOD = "spawn"
 VLLM_NO_USAGE_STATS = "1"
 HF_HUB_OFFLINE = "1"
 TRANSFORMERS_OFFLINE = "1"
+# The serve-with-warmup wrapper polls the API at 127.0.0.1:$PORT — must
+# match `port` above (the launcher only passes --port as a CLI flag).
+PORT = "8000"
 SERVED_MODEL_NAME = "glm-5.3-flash-spark"
 DFLASH_WARMUP = "1"
 DFLASH_WARMUP_CONCURRENCIES = "1"

+ 2 - 8
src/docker/command.rs

@@ -247,14 +247,8 @@ fn collect_nccl_env<'a>(ctx: &'a DockerCommandCtx, node: &'a Node) -> Vec<(&'a s
 
 /// Build the list of `-e KEY=VALUE` Docker env var pairs for a node.
 fn collect_docker_env(ctx: &DockerCommandCtx, node: &Node, is_head: bool) -> Vec<String> {
-    let mut pairs: Vec<(&str, Cow<str>)> = vec![
-        ("HF_HOME", Cow::Borrowed("/root/.cache/huggingface")),
-        // Wrapper-style entrypoints (e.g. sparkring's serve-with-warmup) poll
-        // the API at 127.0.0.1:$PORT; mirror the recipe port so recipes stay
-        // free of a redundant `PORT` env entry. Inert for stock vllm/sglang
-        // (they take `--port` as a CLI flag, which the launcher still appends).
-        ("PORT", Cow::Owned(ctx.recipe.port.to_string())),
-    ];
+    let mut pairs: Vec<(&str, Cow<str>)> =
+        vec![("HF_HOME", Cow::Borrowed("/root/.cache/huggingface"))];
     if ctx.nnodes > 1 {
         pairs.extend(collect_nccl_env(ctx, node));
     }