Files
mediaproc/ctrl/sync.sh
2026-03-30 07:22:14 -03:00

24 lines
670 B
Bash
Executable File

#!/bin/bash
# Sync core/gpu/ folder to the GPU machine
# Usage: ./ctrl/sync.sh [HOST] [DEST]
#
# Examples:
# ./ctrl/sync.sh # defaults: mcrndeb:~/wdir/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 core/gpu/ to ${HOST}:${DEST}..."
rsync -avz --exclude='.git' --exclude='__pycache__' \
--exclude='*.pyc' --exclude='.env' \
--filter=':- .gitignore' \
core/gpu/ "${HOST}:${DEST}/"
echo "Done. Run on ${HOST}:"
echo " cd ${DEST} && cp .env.template .env && ./run.sh"