Skip to content

Commit cb5228c

Browse files
committed
update start vllm server script
1 parent 5f33ed2 commit cb5228c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vllm_musa/start_vllm_server.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ wait_for_log_update() {
148148
local current_size=$(stat -c%s "$log_file")
149149
local last_line=$(tail -n 5 "$log_file" 2>/dev/null | grep -E -v '^[[:space:]]*$')
150150

151-
if grep -q -E "Uvicorn running on http://" <<< "$last_line" && \
151+
if grep -q -E "Application startup complete" <<< "$last_line" && \
152152
[ "$current_size" -ne "$last_size" ]; then
153153
if [ "$WEBUI" == "true" ]; then
154154
echo -e "\e[32mInstalling gradio...\e[0m" >&2
@@ -171,9 +171,10 @@ wait_for_log_update() {
171171
curl http://$host:$port/v1/chat/completions -H "Content-Type: application/json" -d '{
172172
"model": "$model_name",
173173
"messages": [
174-
{"role": "system", "content": "You are a helpful assistant."},
175-
{"role": "user", "content": "Who won the NBA final series in 2020?"}
176-
]
174+
{"role": "system", "content": "You are a helpful assistant."},
175+
{"role": "user", "content": "Who won the NBA final series in 2020?"}
176+
]
177+
177178
}'
178179
EOF
179180
echo -e "\e[0m"
@@ -223,7 +224,7 @@ start_vllm() {
223224
setsid bash -c "stdbuf -oL vllm serve ${FINAL_ARGS[*]} 2>&1 | tee -a $LOG_FILE" &
224225

225226

226-
wait_for_log_update $log_file $! "${DEFUALT_SERVED_MODEL_NAME:-$(basename "$MODEL")}" "$DEFAULT_HOST" "$DEFAULT_PORT"
227+
wait_for_log_update $LOG_FILE $! "${DEFUALT_SERVED_MODEL_NAME:-$(basename "$MODEL")}" "$DEFAULT_HOST" "$DEFAULT_PORT"
227228
}
228229

229230

0 commit comments

Comments
 (0)