add judgement for running serve (#9555)

This commit is contained in:
Lilac09 2023-11-29 16:57:00 +08:00 committed by GitHub
parent 4ff2ca9d0d
commit 557bb6bbdb

View file

@ -213,7 +213,11 @@ else
echo "Worker type: $worker_type"
echo "Worker address: $worker_address"
echo "Controller address: $controller_address"
python3 -m "$worker_type" --model-path $model_path --device cpu --host $worker_host --port $worker_port --worker-address $worker_address --controller-address $controller_address --stream-interval $stream_interval
if [ "$worker_type" == "fastchat.serve.model_worker" ]; then
python3 -m "$worker_type" --model-path $model_path --device cpu --host $worker_host --port $worker_port --worker-address $worker_address --controller-address $controller_address --stream-interval $stream_interval
elif [ "$worker_type" == "fastchat.serve.vllm_worker" ]; then
python3 -m "$worker_type" --model-path $model_path --device cpu --host $worker_host --port $worker_port --worker-address $worker_address --controller-address $controller_address
fi
fi
fi