Files
DB-GPT/run.sh
2023-05-25 23:14:35 +08:00

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