From b307e01cbf9b4024e277c0a4ab0300e0e003a4de Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Tue, 28 Jul 2026 03:09:25 +0000 Subject: [PATCH] Add sync_to_machine.sh for rsync code/data to remote machines --- scripts/sync_to_machine.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/sync_to_machine.sh diff --git a/scripts/sync_to_machine.sh b/scripts/sync_to_machine.sh new file mode 100755 index 0000000..d1f2127 --- /dev/null +++ b/scripts/sync_to_machine.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# ============================================================ +# 把当前机器的 evalscope 代码/数据同步到远程机器 +# 用法: bash scripts/sync_to_machine.sh +# ============================================================ + +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] 同步完成"