Jolly6443 commited on
Commit
fd8d54e
Β·
verified Β·
1 Parent(s): d5498d8

Fix: remove hardcoded ENV MODEL_ID=qwen that was silently overriding SPACE_ROLE on every Space

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -52,14 +52,20 @@ COPY app.py .
52
  EXPOSE 7860
53
 
54
  # ── Default environment (override via Space Settings) ─────────
55
- # MODEL_ID: one of "deepseek", "dolphin", "qwen" (default: qwen)
56
- # MODEL_REPO / MODEL_FILE: raw overrides (optional)
 
 
 
 
 
 
 
57
  # N_CTX: context window tokens (default: 8192)
58
  # N_THREADS: CPU threads (default: 4)
59
  # API_KEY: optional bearer token to protect the API
60
  # CONFIG_URL: optional URL to a JSON config (for multi-Space clusters)
61
- ENV MODEL_ID="qwen" \
62
- N_CTX="8192" \
63
  N_THREADS="4"
64
 
65
  # ── Launch ────────────────────────────────────────────────────
 
52
  EXPOSE 7860
53
 
54
  # ── Default environment (override via Space Settings) ─────────
55
+ # SPACE_ROLE: "reasoning" | "uncensored" | "general" (default: general) β€”
56
+ # picks the curated model automatically. Deliberately NOT setting MODEL_ID
57
+ # here: a hardcoded ENV MODEL_ID would always exist in os.environ, so
58
+ # app.py's `os.environ.get("MODEL_ID", ROLE_TO_MODEL_ID[SPACE_ROLE])`
59
+ # fallback could never trigger β€” every Space would pin to that value
60
+ # regardless of SPACE_ROLE. (This bit us once: this line used to read
61
+ # `ENV MODEL_ID="qwen"` and silently overrode SPACE_ROLE on every Space.)
62
+ # MODEL_ID / MODEL_REPO / MODEL_FILE: optional raw overrides, set only as a
63
+ # Space Variable if you want to bypass role-based selection entirely.
64
  # N_CTX: context window tokens (default: 8192)
65
  # N_THREADS: CPU threads (default: 4)
66
  # API_KEY: optional bearer token to protect the API
67
  # CONFIG_URL: optional URL to a JSON config (for multi-Space clusters)
68
+ ENV N_CTX="8192" \
 
69
  N_THREADS="4"
70
 
71
  # ── Launch ────────────────────────────────────────────────────