Add run-worker.sh script for torchrun-based worker setup
This commit is contained in:
31
run-worker.sh
Executable file
31
run-worker.sh
Executable 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
|
||||||
Reference in New Issue
Block a user