Bladeren bron

feat: set TERM=xterm-256color on head node for colored logs

Replaces the vLLM-specific VLLM_LOGGING_COLOR=1 with the universal
TERM approach.  Setting TERM=xterm-256color tells any process that
it's connected to a color-capable terminal (as opposed to piped
stdout inside Docker), enabling colored output for both vLLM
(which checks isatty()) and SGLang (standard Python logging).

Recipe env vars come after, so a recipe can override via [env]
(e.g. TERM = "dumb" to opt out).
Alexander Korolev 4 maanden geleden
bovenliggende
commit
68132ce91a
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      src/docker/mod.rs

+ 2 - 2
src/docker/mod.rs

@@ -403,9 +403,9 @@ fn build_docker_command(
     cmd.push("-e NCCL_NET=IB".to_string());
     cmd.push("-e NCCL_DEBUG=WARN".to_string());
 
-    // Force colored logs on head; recipe env can override
+    // TERM tells programs they have a color-capable terminal (vs piped stdout)
     if is_head {
-        cmd.push("-e VLLM_LOGGING_COLOR=1".to_string());
+        cmd.push("-e TERM=xterm-256color".to_string());
     }
     for (k, v) in &recipe.env {
         cmd.push(format!("-e {}={}", k, v));