File size: 1,048 Bytes
24aaa76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#SBATCH --job-name=j2_env
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=4
#SBATCH --mem=16G
#SBATCH --time=01:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# J2 step 1: new uv environment .venv_vlm (torch CUDA 12.8 build for H100, newest stable transformers, no vendor OCR packages).
set -eu
UV=$HOME/.local/bin/uv
VENV=/path/to/TURKIC_OCR_CODE/.venv_vlm
export UV_CACHE_DIR=/path/to/TURKIC_OCR_DATA/tmp/uv_cache
mkdir -p $UV_CACHE_DIR
$UV venv $VENV --python 3.12
$UV pip install --python $VENV/bin/python --index-url https://download.pytorch.org/whl/cu128 torch torchvision
# stable releases only (uv skips pre-releases by default)
$UV pip install --python $VENV/bin/python transformers accelerate pillow huggingface_hub tokenizers safetensors sentencepiece protobuf numpy
$UV pip list --python $VENV/bin/python | grep -i -E "^(torch|torchvision|transformers|accelerate|pillow|huggingface[-_]hub|tokenizers|safetensors|sentencepiece|protobuf|numpy) "
echo "[j2_env] done"