美文网首页
配置plotly在线服务

配置plotly在线服务

作者: MR来了 | 来源:发表于2021-07-27 15:44 被阅读0次

首先安装conda环境

conda create -n env_plotly python=3.8
pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ dash
pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ gunicorn
conda install -c anaconda nginx

配置好conf即可访问:

workers = 4
threads = 2
bind = '127.0.0.1:8050'
daemon = 'false'
worker_class = 'gevent'
worker_connections = 200
pidfile = '/var/run/gunicorn.pid'

assesslog = '/var/log/gunicorn_access.log'
errorlog = '/var/log/gunicorn_error.log'

loglevel = 'warning'

然后运行:

#后台启动
nohup gunicorn -c gunicorn.conf app:server >> log.log 2>&1 &
前台启动
gunicorn -c gunicorn.conf app:server
ps -ef|grep gunicorn|grep -v grep|cut -c 9-15|xargs kill -9

相关文章

网友评论

      本文标题:配置plotly在线服务

      本文链接:https://www.haomeiwen.com/subject/yfjomltx.html