Download scripts/r5_vlmb/setup_venv.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_vlmb/setup_venv.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_vlmb/setup_venv.sbatch
-
curl -L -o setup_venv.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_vlmb/setup_venv.sbatch
1.1 kB
| #SBATCH --job-name=r5_vlmb_venv | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=16 | |
| #SBATCH --mem=32G | |
| #SBATCH --time=01:30:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # VLMB: build one pinned uv venv per maker-code model: CODE/.venv_vlm_<name> | |
| # usage: sbatch setup_venv.sbatch NAME PYTHON_VERSION TORCH_INDEX_URL | |
| # reads env/NAME.torch.txt (installed from TORCH_INDEX_URL) and env/NAME.req.txt (PyPI) | |
| set -eu | |
| NAME=$1; PYV=$2; TIDX=$3 | |
| UV=$HOME/.local/bin/uv | |
| CODE=/path/to/TURKIC_OCR_CODE | |
| VENV=$CODE/.venv_vlm_$NAME | |
| ENVD=$CODE/scripts/r5_vlmb/env | |
| export UV_CACHE_DIR=/path/to/TURKIC_OCR_DATA/tmp/uv_cache | |
| unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true | |
| mkdir -p $UV_CACHE_DIR | |
| hostname | |
| rm -rf $VENV | |
| $UV venv $VENV --python $PYV | |
| $UV pip install --python $VENV/bin/python --index-url $TIDX -r $ENVD/$NAME.torch.txt | |
| $UV pip install --python $VENV/bin/python -r $ENVD/$NAME.req.txt | |
| $UV pip freeze --python $VENV/bin/python > $ENVD/$NAME.freeze.txt | |
| $VENV/bin/python --version | |
| cat $ENVD/$NAME.freeze.txt | |
| echo "[r5_vlmb_venv] $NAME done" | |