Forráskód Böngészése

fix: restore VLLM_LOGGING_COLOR=1 alongside TERM=xterm-256color

TERM alone doesn't force colors — programs check isatty() which
returns False when stdout is piped through Docker.  VLLM_LOGGING_COLOR
explicitly forces colored log output regardless of terminal detection.
Both are set: VLLM_LOGGING_COLOR for vLLM specifically, TERM for any
tool that respects it.
Alexander Korolev 4 hónapja
szülő
commit
54de1eb75d
1 módosított fájl, 5 hozzáadás és 6 törlés
  1. 5 6
      src/docker/mod.rs

+ 5 - 6
src/docker/mod.rs

@@ -78,11 +78,9 @@ pub(crate) fn logs_follow_cmd(recipe_name: &str) -> String {
     )
 }
 
-/// Shell-quote `s` so it survives being embedded in a `bash -c` argument.
-/// Wraps the string in single quotes, escaping any embedded single quotes
-/// as `'\''`.  Used to make `build_docker_command` safe against args that
-/// contain whitespace or shell metacharacters (most importantly, the
-/// entrypoint script passed to `sh -c`).
+/// Shell-quote `s` (single-quote + escape embedded `'` as `'\''`).
+/// Used for entrypoint scripts passed to `sh -c` so bash treats them
+/// as a single argv element in the docker run command.
 fn shq(s: &str) -> String {
     let mut out = String::with_capacity(s.len() + 2);
     out.push('\'');
@@ -403,8 +401,9 @@ fn build_docker_command(
     cmd.push("-e NCCL_NET=IB".to_string());
     cmd.push("-e NCCL_DEBUG=WARN".to_string());
 
-    // TERM tells programs they have a color-capable terminal (vs piped stdout)
+    // Force colored vLLM logs through Docker pipeline
     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 {