Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions e2e_test/benchmarks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ def _build_command(
if local_model_path:
cmd.extend(["-v", f"{local_model_path}:{local_model_path}"])

# Mount host HF cache into container so genai-bench reuses tokenizers
# already downloaded by sglang workers instead of downloading from HF
# (HF downloads inside ephemeral containers hang intermittently).
hf_home = os.environ.get("HF_HOME", os.path.join(Path.home(), ".cache", "huggingface"))
if os.path.isdir(hf_home):
cmd.extend(["-v", f"{hf_home}:{hf_home}", "-e", f"HF_HOME={hf_home}"])

# Pass through environment variables the container may need
for var in ("HF_TOKEN", "HF_HOME"):
if os.environ.get(var):
Expand Down