小编Kar*_*hik的帖子

无法在 Gunicorn 上部署 dash 应用程序

我想在 Gunicorn 上部署一个 dash 应用程序。但我不能这样做。当我执行以下命令时,我在屏幕上没有看到任何错误gunicorn <module_name>:<variable_name>

\n

版本:

\n
    \n
  • 枪兽 (20.0.4)
  • \n
  • 破折号(1.17.0)
  • \n
  • 破折号核心组件 (1.13.0)
  • \n
  • dash-html-组件 (1.1.1)
  • \n
  • 破折号渲染器 (1.8.3)
  • \n
  • 破折号表 (4.11.0)
  • \n
\n

我的破折号应用程序,文件名:analyzer.py

\n
import dash_core_components as dcc\nimport dash_html_components as html\nfrom dash.dependencies import Input, Output\nimport pandas as pd\nimport flask\n\n<data_frame definitions>\n\n\napp = dash.Dash()\nserver = app.server\n\n<app.layout>\n\n<Call backs>\n\n## at the end\n\nif __name__ == '__main__':\n    app.run_server()\n
Run Code Online (Sandbox Code Playgroud)\n

当我使用以下命令时,我在屏幕上看不到任何错误,但我仍然可以\xe2\x80\x99t从浏览器访问该应用程序。

\n
[user1@myHost]$ gunicorn analyzer:server -b:8000\n\n[2021-04-16 16:57:58 +0200] [8334] [INFO] Starting gunicorn 20.0.4\n[2021-04-16 16:57:58 +0200] [8334] [INFO] Listening at: …
Run Code Online (Sandbox Code Playgroud)

python-3.x gunicorn plotly-dash

5
推荐指数
1
解决办法
6103
查看次数

标签 统计

gunicorn ×1

plotly-dash ×1

python-3.x ×1