Skip to content

Commit 0859d8c

Browse files
committed
update check for hf_token
1 parent a834acf commit 0859d8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

charts/all/vllm-inference-service/templates/inference-service.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ spec:
3535
python - <<'PY'
3636
from huggingface_hub import snapshot_download, login
3737
import os
38-
token = os.environ.get("HF_TOKEN")
38+
token = os.environ.get("HF_TOKEN", "").strip()
3939
model = os.environ.get("MODEL_ID")
4040
if token:
41+
print("HF_TOKEN found, logging in to Hugging Face...")
4142
login(token=token)
43+
else:
44+
print("No HF_TOKEN found, downloading model without authentication...")
4245
snapshot_download(
4346
repo_id=model,
4447
local_dir="/cache/models"

0 commit comments

Comments
 (0)