Add sync_to_machine.sh for rsync code/data to remote machines
This commit is contained in:
parent
f758f94828
commit
b307e01cbf
26
scripts/sync_to_machine.sh
Executable file
26
scripts/sync_to_machine.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ============================================================
|
||||||
|
# 把当前机器的 evalscope 代码/数据同步到远程机器
|
||||||
|
# 用法: bash scripts/sync_to_machine.sh <IP>
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
IP="${1:?请提供远程机器 IP}"
|
||||||
|
PASS="${SSHPASS:-sskj2025}"
|
||||||
|
LOCAL_DIR="/data1/sora/evalscope"
|
||||||
|
REMOTE_DIR="/data1/sora/evalscope"
|
||||||
|
|
||||||
|
echo "==> [$IP] 同步 evalscope 代码..."
|
||||||
|
sshpass -p "$PASS" rsync -av --delete \
|
||||||
|
--exclude='output' \
|
||||||
|
--exclude='output_*' \
|
||||||
|
--exclude='logs' \
|
||||||
|
--exclude='docker/swebench_v' \
|
||||||
|
--exclude='docker/images' \
|
||||||
|
--exclude='docker/containerd' \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='*.tar.gz' \
|
||||||
|
"$LOCAL_DIR/" "root@$IP:$REMOTE_DIR/"
|
||||||
|
|
||||||
|
echo "==> [$IP] 同步完成"
|
||||||
Loading…
x
Reference in New Issue
Block a user