1313
1414set -ex
1515
16- # ##############################################################################
17- # 1. Parse arguments
18- # ##############################################################################
1916TEST_NAME=$1
2017IB_ENVIRONMENT=" ${2:- true} "
2118PLATFORM=" ${3:- cuda} "
2219CONTAINER_NAME=" ${4:- mscclpp-test} "
2320SGLANG_IMAGE=" ${5:- lmsysorg/ sglang: latest} "
2421
25- # ##############################################################################
26- # 2. Resolve paths and host file
27- # ##############################################################################
2822KeyFilePath=${SSHKEYFILE_SECUREFILEPATH}
2923ROOT_DIR=" ${SYSTEM_DEFAULTWORKINGDIRECTORY} /"
3024DST_DIR=" /tmp/mscclpp"
3731
3832SSH_OPTION=" StrictHostKeyChecking=no"
3933
40- # ##############################################################################
41- # 3. Prepare SSH keys
42- # ##############################################################################
4334chmod 400 ${KeyFilePath}
4435ssh-keygen -t rsa -f sshkey -P " "
4536
46- # ##############################################################################
47- # 4. Wait for remote hosts to be reachable
48- # ##############################################################################
4937while true ; do
5038 set +e
5139 parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION " hostname"
@@ -57,26 +45,17 @@ while true; do
5745done
5846set -e
5947
60- # ##############################################################################
61- # 5. Copy source tree to remote hosts
62- # ##############################################################################
6348parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION " sudo rm -rf ${DST_DIR} "
6449tar czf /tmp/mscclpp.tar.gz -C ${ROOT_DIR} .
6550parallel-scp -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION /tmp/mscclpp.tar.gz /tmp/mscclpp.tar.gz
6651parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION \
6752 " sudo mkdir -p ${DST_DIR} && sudo tar xzf /tmp/mscclpp.tar.gz -C ${DST_DIR} && sudo rm -f /tmp/mscclpp.tar.gz"
6853rm -f /tmp/mscclpp.tar.gz
6954
70- # ##############################################################################
71- # 6. Platform-specific setup (ROCm kernel module)
72- # ##############################################################################
7355if [ " ${PLATFORM} " == " rocm" ]; then
7456 parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION " sudo modprobe amdgpu"
7557fi
7658
77- # ##############################################################################
78- # 7. Pull the latest container image
79- # ##############################################################################
8059# Install GDRCopy kernel module on host VMs (CUDA only)
8160GDRCOPY_VERSION=" 2.5.2"
8261if [ " ${PLATFORM} " == " cuda" ]; then
@@ -95,10 +74,6 @@ if [ "${PLATFORM}" == "cuda" ]; then
9574 fi"
9675fi
9776
98- # ##############################################################################
99- # 8. Launch Docker container
100- # ##############################################################################
101-
10277if [ " ${CONTAINER_NAME} " == " sglang-mscclpp-test" ]; then
10378 # force to pull the latest image
10479 parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION \
132107 fi
133108fi
134109
135- # ##############################################################################
136- # 9. Run setup script inside the container
137- # ##############################################################################
138110parallel-ssh -i -t 0 -h ${HOSTFILE} -x " -i ${KeyFilePath} " -O $SSH_OPTION \
139111 " sudo docker exec -t --user root ${CONTAINER_NAME} bash '/root/mscclpp/test/deploy/setup.sh' ${PLATFORM} "
0 commit comments