Skip to content

Commit 76ce4ce

Browse files
committed
[Multi-host] Fix bugs in the deployment script
Signed-off-by: Lihao Ran <[email protected]>
1 parent 0aa5183 commit 76ce4ce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/multihost/deploy_cluster.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ if [ ! -f "${SCRIPT_PATH}" ]; then
7575
exit 1
7676
fi
7777

78+
7879
# Convert comma-separated worker string to a bash array for SSH access
7980
IFS=',' read -r -a WORKER_SSH_IPS <<< "$WORKER_SSH_IP_STRING"
8081
# Create a list of all SSH IPs for cleanup and script distribution
8182
ALL_SSH_IPS=("${HEAD_SSH_IP}" "${WORKER_SSH_IPS[@]}")
8283

8384
if [ -z "${SSH_USER}" ]; then
84-
read -pr "Enter the SSH username for all hosts: " SSH_USER
85+
printf "Enter the SSH username for all hosts: "
86+
read -r SSH_USER
8587
fi
8688

8789
# --- STEP 1: Pre-Deployment Cleanup ---
@@ -96,7 +98,8 @@ fi
9698

9799
# --- STEP 2: Distribute the script ---
98100
echo "📦 Distributing '${SCRIPT_PATH}' to all hosts..."
99-
REMOTE_SCRIPT_DIR="$HOME/tpu-inference/scripts/multihost"
101+
REMOTE_HOME_DIR="~"
102+
REMOTE_SCRIPT_DIR="${REMOTE_HOME_DIR}/tpu-inference/scripts/multihost"
100103
REMOTE_SCRIPT_PATH="${REMOTE_SCRIPT_DIR}/run_cluster.sh"
101104
SSH_OPTIONS="-o StrictHostKeyChecking=no -o BatchMode=yes"
102105

0 commit comments

Comments
 (0)