Add run-worker.sh script for torchrun-based worker setup

This commit is contained in:
JK Woo
2026-06-26 14:23:59 +00:00
parent ded37a526e
commit 513be5d1c4

31
run-worker.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail
CONTAINER=vllm-worker
ROLE=worker
HEAD_IP=10.200.0.1
WORKER_IP=10.200.0.2
docker rm -f $CONTAINER 2>/dev/null || true
echo "Launching WORKER Container with RDMA/RoCE passthrough & Correct Entrypoint..."
docker run -d \
--name $CONTAINER \
--init \
--entrypoint "" \
--gpus all \
--network host \
--ipc host \
--ulimit memlock=-1:-1 \
--ulimit stack=-1:-1 \
--cap-add IPC_LOCK \
--device=/dev/infiniband \
-e ROLE=$ROLE \
-e HEAD_IP=$HEAD_IP \
-e WORKER_IP=$WORKER_IP \
-v /home/admin/.cache/huggingface:/root/.cache/huggingface \
-v /vllm-workspace:/workspace \
vllm-ray:custom \
/bin/bash /workspace/start-ray.sh