File size: 805 Bytes
031e289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
# Linux/RunPod: isolated Python environment reusing the image's CUDA torch.
set -euo pipefail
cd "$(dirname "$0")/.."
python3 -m venv --system-site-packages .venv-v2
PYTHON=.venv-v2/bin/python
"$PYTHON" -m pip install -e '.[dev]'
nvidia-smi --query-gpu=name,memory.total --format=csv
"$PYTHON" - <<'PY'
from pathlib import Path
from huggingface_hub import snapshot_download
target = Path('models/Qwen3-8B')
index = target / 'model.safetensors.index.json'
if not index.is_file():
    snapshot_download('Qwen/Qwen3-8B', local_dir=target,
                      allow_patterns=['*.json', '*.safetensors', '*.txt', '*.model', 'tokenizer*'])
print('Base model:', target.resolve())
PY
"$PYTHON" -m pytest
echo 'Ready. Run: .venv-v2/bin/python scripts/run_pipeline.py --model models/Qwen3-8B'