File size: 775 Bytes
84bcfb1 0c5c33b 84bcfb1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/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
|