为什么 Heroku + voila ipynb 应用程序无法部署,并显示“无法在启动后 60 秒内绑定到 $PORT”

2023-12-09

我按照不同的页面在 Heroku 上部署了 voila ipynb 应用程序:https://pythonforundergradengineers.com/deploy-jupyter-notebook-voila-heroku.html https://medium.com/analytics-vidhya/deploying-jupyter-notebook-as-a-web-app-with-heroku-d157b68bcccc https://github.com/voila-dashboards/voila-heroku

不幸的是,上个月似乎存在一个持续存在的错误(例如在这里看到https://forums.fast.ai/t/heroku-app-wont-deploy/92875/4)

您可以在这里找到我尝试部署的 github 存储库:https://github.com/vpicouet/fireball2-etc

该应用程序基于此 Procfileweb: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb

不幸的是我收到这个错误

2022-03-27T15:17:49.880973+00:00 app[web.1]: [Voila] Using /tmp to store connection files
2022-03-27T15:17:49.881302+00:00 app[web.1]: [Voila] Storing connection files in /tmp/voila_yih2j7ic.
2022-03-27T15:17:49.881356+00:00 app[web.1]: [Voila] Serving static files from /app/.heroku/python/lib/python3.8/site-packages/voila/static.
2022-03-27T15:17:49.890735+00:00 app[web.1]: [Voila] Voilà is running at:
2022-03-27T15:17:49.890737+00:00 app[web.1]: http://localhost:7758/
2022-03-27T15:17:58.000000+00:00 app[api]: Build succeeded
2022-03-27T15:18:48.015586+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-03-27T15:18:48.055996+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-27T15:18:48.227953+00:00 heroku[web.1]: Process exited with status 137
2022-03-27T15:18:48.274554+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-27T15:24:44.773897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=0b0c1707-d6ae-449a-9059-f2d1d3f8c652 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
2022-03-27T15:39:30.626492+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=af5c3e4a-019f-47c3-a047-e5115ebd5fc7 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https

你知道如何解决这个问题吗? 多谢!

我已经在网上尝试过一些想法: 改变web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb by worker: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb


答案可以在这里找到:第1047期

从 0.3.0 开始,出于安全原因,Voila 默认不会监听所有接口 (#926)。对于 Heroku,您需要将 --Voila.ip=0.0.0.0 添加到 Procfile 中的命令中才能使其正常工作。

也可以看看:https://github.com/voila-dashboards/voila-heroku

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 Heroku + voila ipynb 应用程序无法部署,并显示“无法在启动后 60 秒内绑定到 $PORT” 的相关文章

随机推荐