thegovind's picture
Make the public instructions work on a fresh download (part 2)
0c5c33b verified
Raw History Blame Contribute Delete
775 Bytes
#!/usr/bin/env bash
# Copy the lab code, and the few files of the paper's repo it needs, to GPU machines.
# bash scripts/sync_vm.sh trainer sampler
set -euo pipefail
cd "$(dirname "$0")/.."
X=external/lm_understand-logs/exp8_math
for h in "$@"; do
ssh "$h" "mkdir -p /nvme/wsp-lab/code/$X/runs" </dev/null
dirs=(); for d in wsp scripts configs plans labs; do [ -d "$d" ] && dirs+=("$d"); done
# Lab 8 writes configs/capstone.json on the GPU machine; --delete must not remove it before you copy it back.
rsync -az --delete --exclude __pycache__ --filter 'P configs/capstone.json' "${dirs[@]}" "$h:/nvme/wsp-lab/code/"
rsync -az "$X/code" "$X/practice" "$h:/nvme/wsp-lab/code/$X/"
rsync -az "$X/runs/p50c" "$h:/nvme/wsp-lab/code/$X/runs/"
echo "synced $h"
done