Skip to content

Commit 4b1f6d5

Browse files
test multinode
1 parent 70afd36 commit 4b1f6d5

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

test/vllm/ec2/test_artifacts/test_ec2.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,20 @@ def test_vllm_benchmark_on_multi_node(head_connection, worker_connection, image_
156156
head_container_id = get_container_id(head_connection, image_uri)
157157
print("Starting model serving inside Ray container...")
158158

159-
time.sleep(700)
160-
161-
commands_serving = [
162-
"tmux new-session -d -s vllm_serve",
163-
"tmux ls",
164-
"tmux attach-session -t vllm_serve",
165-
f'docker exec -it {head_container_id} -c "vllm serve {model_name} \
166-
--tensor-parallel-size 8 \
167-
--pipeline-parallel-size 2 \
168-
--max-num-batched-tokens 16384"',
169-
]
170-
171-
head_connection.run(";".join(commands_serving), asynchronous=True)
159+
container_name = head_connection.run(
160+
'docker ps --format "{{.Names}}" --filter "ancestor=$IMAGE_URI" | head -n 1'
161+
).strip()
162+
163+
serve_command = f"vllm serve {model_name} --tensor-parallel-size 8 --pipeline-parallel-size 2 --max-num-batched-tokens 16384"
164+
165+
run_cmd_on_container(
166+
container_name,
167+
head_connection,
168+
serve_command,
169+
hide=True,
170+
timeout=300,
171+
asynchronous=True,
172+
)
172173

173174
print("Running benchmark...")
174175
benchmark_cmd = create_benchmark_command(model_name)

0 commit comments

Comments
 (0)