Skip to content

Commit d96a131

Browse files
committed
update serving
1 parent cdbdb7c commit d96a131

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

vllm/demo/run_vllm_serving.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,10 @@ wait_for_log_update() {
238238
if grep -q -E "Uvicorn running on http://" <<< "$last_line" && \
239239
[ "$current_size" -ne "$last_size" ]; then
240240
if [ "$WEBUI" == "true" ]; then
241-
echo -e "\e[32m"
242-
echo "Installing gradio..." >&2
241+
echo -e "\e[32mInstalling gradio...\e[0m" >&2
243242
pip install gradio
244-
echo "Start gradio webui..." >&2
245-
create_web_ui "$host" "$port" "$model_name" >&2
246-
echo -e "\e[0m"
243+
echo -e "\e[32mStart gradio webui...\e[0m" >&2
244+
setsid python -u ./gradio_demo/app.py --ip "$host" --port "$port" --model-name "$model_name" | tee -a webui.log &
247245
wait $! # 等待该进程结束
248246
exit 0
249247
else
@@ -289,14 +287,6 @@ EOF
289287
return 1
290288
}
291289

292-
create_web_ui() {
293-
local ip="$1"
294-
local port="$2"
295-
local served_model_name="$3"
296-
297-
python ./gradio_demo/app.py --ip "$ip" --port "$port" --model-name "$served_model_name"
298-
}
299-
300290
start_server() {
301291
# 解析传入的参数
302292
local converted_model_path="$1"

0 commit comments

Comments
 (0)