mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-31 16:39:48 +00:00
26 lines
569 B
Bash
26 lines
569 B
Bash
#!/bin/bash
|
|
|
|
function find_python_command() {
|
|
if command -v python &> /dev/null
|
|
then
|
|
echo "python"
|
|
elif command -v python3 &> /dev/null
|
|
then
|
|
echo "python3"
|
|
else
|
|
echo "Python not found. Please install python."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
PYTHONCMD=$(find_python_command)
|
|
|
|
nohup PYTHONCMD pilot/server/llmserver.py >> /root/server.log 2>&1 &
|
|
while [ `grep -c "Uvicorn running on" /root/server.log` -eq '0' ];do
|
|
sleep 1s;
|
|
echo "wait server running"
|
|
done
|
|
echo "server running"
|
|
|
|
PYTHONCMD pilot/server/webserver.py
|