#! /bin/env bash
python_home=/opt/module/anaconda3/envs/py_gpt
cd /mnt/py_gpt
/opt/module/anaconda3/envs/py_gpt/bin/pip3 install -r requirements.txt
# 关闭
ps aux | grep 'gunicorn app:create_app' | grep -v grep | awk '{print $2}' | xargs kill -9
rm /tmp/log/gunicorn_debug.log
/opt/module/anaconda3/envs/py_gpt/bin/gunicorn "app:create_app('production')" -c gunicorn.conf.py
echo success
sleep 2
cat /tmp/log/gunicorn_debug.log