Hello,
I have a question similar to old unanswered question from 2021
I am having some hard times getting Dash to run properly in Jupyter (hosted on my local machine in a docker env).
I finally got it to run when biding on 0.0.0.0 such as this:
from dash import Dash, html
app = Dash(__name__)
app.layout = html.Div("Hello!")
if __name__ == "__main__":
app.run(host='0.0.0.0', jupyter_mode="tab", port=6010)
However this returns:
Dash app running on http://0.0.0.0:6010/
And thus “breaks” jupyter interaction as it tries to load 0.0.0.0:6010, since i am accessing it from outside docker it should be on 127.0.0.1 since i mapped the ports.
I have to go and change it to 127.0.0.1 manually each time which doesn’t make for a good experience (and this only works when using the new tab mode “tab”, any other mode such as “inline” etc. will just break).
I tried using
proxy='http://0.0.0.0:6010::http://127.0.0.1:6010'
But this still returns the 0.0.0.0 binding.
Since it is in docker, if i set 127.0.0.1 as the host the connection is simply declined, since it is initialized outside of docker, from my localhost.
Is there any way to uses 0.0.0.0 binding while having it return the proxy address ?
Or is there any Flask parameters i am not aware off ?
Or even docker settings other than exposing/mapping the ports ?
Thanks.