SPB Git

spb/wp31_uqo

Public
1011 B · 13 lines shellscript
1#!/bin/bash2# Sync the repository (code + processed data) to a MacLustr node and build its venv. Usage: scripts/cluster_setup.sh <node> [--no-data]3set -e4NODE=$1; NODATA=$25REMOTE=~/wp31/prisme-slm6ssh "$NODE" "mkdir -p $REMOTE"7rsync -az --delete --exclude .venv --exclude data/raw --exclude '/experiments/runs' --exclude .git --exclude 'data/processed' --exclude '.pytest_cache' --exclude '__pycache__' ./ "$NODE:$REMOTE/"8if [ "$NODATA" != "--no-data" ]; then9  rsync -az data/processed/ "$NODE:$REMOTE/data/processed/"10fi11ssh "$NODE" "export PATH=\$HOME/.local/bin:/opt/homebrew/bin:\$PATH; cd $REMOTE && (test -x .venv/bin/python || uv venv --python 3.12 .venv -q) && uv pip install -p .venv/bin/python -q torch numpy pyyaml pytest hypothesis matplotlib tokenizers datasets safetensors scipy pandas psutil tqdm && .venv/bin/python scripts/environment_audit.py --smoke --out hardware/device_inventory_\$(hostname -s).json | grep -E 'hostname|cpu_brand|gpu_cores|\"torch\"|mps' "12echo "setup done on $NODE"13
Files · 7846b4f1c44cd53b7d0886106bbb4f52eb1f2ab6
Menu

Theme