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 lines27282930313233343536373846 unmodified lines85868788899091927 unmodified lines10010110210310410510643 unmodified lines15015115215315415515617 unmodified lines1741751761771781791805 unmodified lines1861871881891901911921 unmodified line19419519619719819920026 unmodified linesexec > >(tee -a "$LOG") 2>&1say() { printf '\n=== %s %s\n' "$(date +%T)" "$*"; }conda_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,noheaderlocal cuda; cuda=$(nvidia-smi | sed -n 's/.*CUDA Version: \([0-9.]*\).*/\1/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.11conda activate plmappip install -q --upgrade pippip 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 linesecho "HF_TOKEN not set: public downloads still work, gated models will not"fiif [ -n "${WANDB_API_KEY:-}" ]; thenconda_on plmap && wandb login --relogin "$WANDB_API_KEY" >/dev/null && echo "wandb: logged in"elseecho "WANDB_API_KEY not set: W&B runs will stay offline (wandb sync later)"fi43 unmodified linesstage_data() {say "data: plmap_2026-11-02 from eztao/data_transfer ($JOBS tars in flight, sha256-checked, resumable)"conda_on plmapexport HF_HOME=$U/hf_cachepython "$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/*"])snapshot_download("Yuheng02/OmniRoam", local_dir="models/OmniRoam", allow_patterns=["Preview/*", "*.md", "*.json"])EOFlocal 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 linesstage_miniworld() {say "Miniworld 2.1.0 (only needed to render new worlds; the cluster kept it under pylibs/)"conda_on plmappip install -q --no-deps miniworld==2.1.0 pyglet==1.5.31 gymnasium==1.4.0 cloudpickle farama-notificationsPYGLET_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 linestage_checks() {say "checks: GPU + SDPA vs float64, the 19 tests/ scripts, the VAE CPU checks"conda_on plmapcd "$LINK/plmap"python tools/vastai/gpu_check.pylocal pass=0 fail=0 failed=()26 unmodified lines272829303132333435363738394046 unmodified lines878889909192939495969798997 unmodified lines10710810911011111211343 unmodified lines15715815916016116216317 unmodified lines1811821831841851861871881891901911921931941951961975 unmodified lines2032042052062072082091 unmodified line21121221321421521621726 unmodified linesexec > >(tee -a "$LOG") 2>&1say() { 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 \(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"# 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 nothingif [ ! -x "$PLMAP_ENV/bin/python" ]; thenif [ -x /venv/plmap/bin/python ]; then ln -sfn /venv/plmap "$PLMAP_ENV" # made by an older run of this scriptelse conda create -y -q -p "$PLMAP_ENV" python=3.11; fificonda activate "$PLMAP_ENV"pip install -q --upgrade pippip 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 linesecho "HF_TOKEN not set: public downloads still work, gated models will not"fiif [ -n "${WANDB_API_KEY:-}" ]; thenconda_on "$PLMAP_ENV" && wandb login --relogin "$WANDB_API_KEY" >/dev/null && echo "wandb: logged in"elseecho "WANDB_API_KEY not set: W&B runs will stay offline (wandb sync later)"fi43 unmodified linesstage_data() {say "data: plmap_2026-11-02 from eztao/data_transfer ($JOBS tars in flight, sha256-checked, resumable)"conda_on "$PLMAP_ENV"export HF_HOME=$U/hf_cachepython "$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"])except Exception as e: # the repo went manual-gated after 2026-10-30, when the cluster copy was fetchedraise 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")EOFlocal 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 linesstage_miniworld() {say "Miniworld 2.1.0 (only needed to render new worlds; the cluster kept it under pylibs/)"conda_on "$PLMAP_ENV"pip install -q --no-deps miniworld==2.1.0 pyglet==1.5.31 gymnasium==1.4.0 cloudpickle farama-notificationsPYGLET_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 linestage_checks() {say "checks: GPU + SDPA vs float64, the 19 tests/ scripts, the VAE CPU checks"conda_on "$PLMAP_ENV"cd "$LINK/plmap"python tools/vastai/gpu_check.pylocal pass=0 fail=0 failed=()
plmap_2026-11-02/vastai_setup.sh+25-8