File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
charts/all/vllm-inference-service/templates Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3535 python - <<'PY'
3636 from huggingface_hub import snapshot_download, login
3737 import os
38- token = os.environ.get("HF_TOKEN")
38+ raw_token = os.environ.get("HF_TOKEN", "")
39+ token = raw_token.strip()
3940 model = os.environ.get("MODEL_ID")
40- login(token=token)
41+ if not token or not token.startswith("hf_"):
42+ print("[HF] HF_TOKEN empty or invalid format; skipping login")
43+ os.environ.pop("HF_TOKEN", None)
44+ else:
45+ print("[HF] HF_TOKEN present; attempting login")
46+ login(token=token)
4147 snapshot_download(
4248 repo_id=model,
4349 local_dir="/cache/models"
5157 secretKeyRef :
5258 name : huggingface-secret
5359 key : hftoken
60+ optional : true
5461 - name : MODEL_ID
5562 value : {{ .Values.global.model.vllm | quote }}
5663 volumeMounts :
You can’t perform that action at this time.
0 commit comments