Download scripts/prefetch.sh from mohameddalii/ocr-mt-5090: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/mohameddalii/ocr-mt-5090/resolve/main/scripts/prefetch.sh
- Command line
-
hf download hf://mohameddalii/ocr-mt-5090/scripts/prefetch.sh
-
curl -L -o prefetch.sh https://huggingface.co/mohameddalii/ocr-mt-5090/resolve/main/scripts/prefetch.sh
587 Bytes
| # 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 | |