plmap_2026-11-02: vastai_setup.sh = tools/vastai/setup.sh at d02c376 (CUDA UMD parse, env by path, keep preview.ckpt)
Browse files26 unmodified lines27282930313233343536353738394046 unmodified lines8788898889909192939495969798997 unmodified lines10710810910311011111211343 unmodified lines15715815915316016116216317 unmodified lines1811821831841851861871881771891901911921931941951961975 unmodified lines2032042051892062072082091 unmodified line21121221319721421521621726 unmodified linesexec > >(tee -a "$LOG") 2>&1
say() { printf '\n=== %s %s\n' "$(date +%T)" "$*"; }PLMAP_ENV=$U/anaconda3/envs/plmapconda_on() { source "$U/anaconda3/etc/profile.d/conda.sh"; conda activate "$1"; }
stage_preflight() { say "preflight" nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader # drivers >= 6xx print "CUDA UMD Version: 13.4" in the header (the old "CUDA Version:" field is deprecated) local cuda; cuda=$(nvidia-smi | sed -n 's/.*CUDA Version: \([0-9.]*\).*/\1/p' | head -1) local cuda; cuda=$(nvidia-smi | sed -n 's/.*CUDA \(UMD \)\{0,1\}Version: *\([0-9.]*\).*/\2/p' | head -1) echo "driver supports CUDA $cuda" awk -v c="$cuda" 'BEGIN { split(c, v, "."); exit !(v[1] > 12 || (v[1] == 12 && v[2] >= 8)) }' \ || { echo "ERROR: torch 2.9.1+cu128 needs a driver with CUDA >= 12.8 (pick another host)"; exit 1; }46 unmodified linesstage_plmap() { say "plmap env (python 3.11, requirements.txt: torch 2.9.1 + CUDA 12.8 wheels, wandb 0.30.0)" source "$U/anaconda3/etc/profile.d/conda.sh" conda env list | grep -q '^plmap ' || conda create -y -q -n plmap python=3.11 conda activate plmap # by path, not -n: Vast images ship a /root/.condarc whose envs_dirs start with /venv, so -n plmap lands in # /venv/plmap, and the scripts that call $LINK/anaconda3/envs/plmap/bin/python directly find nothing if [ ! -x "$PLMAP_ENV/bin/python" ]; then if [ -x /venv/plmap/bin/python ]; then ln -sfn /venv/plmap "$PLMAP_ENV" # made by an older run of this script else conda create -y -q -p "$PLMAP_ENV" python=3.11; fi fi conda activate "$PLMAP_ENV" pip install -q --upgrade pip pip install -q -r "$U/plmap/requirements.txt" python -c "import torch, wandb, transformers, huggingface_hub as h; print('torch', torch.__version__, 'cuda', torch.version.cuda, '| wandb', wandb.__version__, '| transformers', transformers.__version__, '| hf', h.__version__)"7 unmodified lines echo "HF_TOKEN not set: public downloads still work, gated models will not" fi if [ -n "${WANDB_API_KEY:-}" ]; then conda_on plmap && wandb login --relogin "$WANDB_API_KEY" >/dev/null && echo "wandb: logged in" conda_on "$PLMAP_ENV" && wandb login --relogin "$WANDB_API_KEY" >/dev/null && echo "wandb: logged in" else echo "WANDB_API_KEY not set: W&B runs will stay offline (wandb sync later)" fi43 unmodified lines
stage_data() { say "data: plmap_2026-11-02 from eztao/data_transfer ($JOBS tars in flight, sha256-checked, resumable)" conda_on plmap conda_on "$PLMAP_ENV" export HF_HOME=$U/hf_cache python "$U/plmap/tools/vastai/restore_hf_data.py" "$LINK/plmap" "$WORKDIR/hf_transfer" --jobs "$JOBS" du -sh "$U/plmap/data/Holo360D_aligned" "$U/plmap/data/Holo360D_aligned_views" 2>/dev/null || true17 unmodified linessnapshot_download("Wan-AI/Wan2.1-T2V-1.3B", local_dir="models/Wan-AI/Wan2.1-T2V-1.3B", allow_patterns=["diffusion_pytorch_model.safetensors", "models_t5_umt5-xxl-enc-bf16.pth", "Wan2.1_VAE.pth", "*.json", "google/*"])from pathlib import Pathif Path("models/OmniRoam/Preview/preview.ckpt").exists(): print("models/OmniRoam/Preview/preview.ckpt present: not downloading (its sha256 is checked below)")else: try:snapshot_download("Yuheng02/OmniRoam", local_dir="models/OmniRoam", allow_patterns=["Preview/*", "*.md", "*.json"]) snapshot_download("Yuheng02/OmniRoam", local_dir="models/OmniRoam", allow_patterns=["Preview/*", "*.md", "*.json"]) except Exception as e: # the repo went manual-gated after 2026-10-30, when the cluster copy was fetched raise SystemExit(f"OmniRoam preview weights not downloadable ({type(e).__name__}): request access at " "https://huggingface.co/Yuheng02/OmniRoam with the token's account (fine-grained tokens also " "need 'read public gated repos'), or copy the cluster's " "external/OmniRoam/models/OmniRoam/Preview/preview.ckpt here and rerun this stage")EOF local want; want=$(awk '{print $1}' "$U/plmap/outputs/omniroam_s0_20261030/preview_ckpt.sha256" 2>/dev/null || true) local got; got=$(sha256sum models/OmniRoam/Preview/preview.ckpt | awk '{print $1}')5 unmodified lines
stage_miniworld() { say "Miniworld 2.1.0 (only needed to render new worlds; the cluster kept it under pylibs/)" conda_on plmap conda_on "$PLMAP_ENV" pip install -q --no-deps miniworld==2.1.0 pyglet==1.5.31 gymnasium==1.4.0 cloudpickle farama-notifications PYGLET_HEADLESS=1 python -c "import miniworld; print('miniworld', miniworld.__version__)" \ || echo "WARNING: no GL here; Mesa software EGL works (memory: miniworld-on-cluster), see tools/miniworld_rgb_worker.py"1 unmodified line
stage_checks() { say "checks: GPU + SDPA vs float64, the 19 tests/ scripts, the VAE CPU checks" conda_on plmap conda_on "$PLMAP_ENV" cd "$LINK/plmap" python tools/vastai/gpu_check.py local pass=0 fail=0 failed=()plmap_2026-11-02/vastai_setup.sh+25-8