24 lines
647 B
Bash
Executable File
24 lines
647 B
Bash
Executable File
#!/bin/bash
|
|
# Sync gpu/ folder to the GPU machine
|
|
# Usage: ./ctrl/sync.sh [HOST] [DEST]
|
|
#
|
|
# Examples:
|
|
# ./ctrl/sync.sh # defaults: mcrn:~/mpr/gpu
|
|
# ./ctrl/sync.sh 192.168.1.3 # custom host
|
|
# ./ctrl/sync.sh mcrn ~/inference # custom host + dest
|
|
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
|
|
HOST="${1:-mcrndeb}"
|
|
DEST="${2:-~/wdir/mpr/gpu}"
|
|
|
|
echo "Syncing gpu/ to ${HOST}:${DEST}..."
|
|
rsync -avz --exclude='.git' --exclude='__pycache__' \
|
|
--exclude='*.pyc' --exclude='.env' \
|
|
--filter=':- .gitignore' \
|
|
gpu/ "${HOST}:${DEST}/"
|
|
|
|
echo "Done. Run on ${HOST}:"
|
|
echo " cd ${DEST} && cp .env.template .env && ./run.sh"
|