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



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

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

你可以在这里找到我试图部署的github repo: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通过worker: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb

答案可以在这里找到:问题1047

从0.3.0开始,出于安全原因,Voila默认不会监听所有接口(#926(。在Heroku的情况下,您需要在Procfile中的命令中添加--Voila.ip=0.0.0.0以使其工作。

另请参阅:https://github.com/voila-dashboards/voila-heroku

最新更新