Python使用虚拟环境
python3 -m venv /path/to/new/virtual/environment
使用supervisor启动虚拟环境的进程
1.创建sh文件
#! /bin/bashcd /home/wwwroot/Venvsource bin/activatecd TensorFlow-Serverexec python3 app.py
2./etc/supervisord.d新增配置ini文件
[program:TensorFlow-Server]command=sh startTf.shdirectory=/home/wwwroot/Venvuser=rootstopsignal=INTautostart=trueautorestart=truestartsecs=1stderr_logfile=/home/log/TensorFlow-Server.err.log
