File size: 587 Bytes
ba8abef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
# Prefetch both model repos into HF_HOME so the first vLLM start is local.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
export HF_HOME="${HF_HOME:-${ROOT}/.hf_home}"
if [[ -f "${VENV:-$ROOT/.venv}/bin/activate" ]]; then
  # shellcheck disable=SC1091
  source "${VENV:-$ROOT/.venv}/bin/activate"
fi
python3 - <<'PY'
from huggingface_hub import snapshot_download
for repo in ("Qwen/Qwen3-4B-Instruct-2507", "PaddlePaddle/PaddleOCR-VL"):
    print("fetching", repo)
    snapshot_download(repo, resume_download=True)
    print("ok", repo)
PY