-
Notifications
You must be signed in to change notification settings - Fork 233
Run jupyter-dash with Jupyterlab2.x + JupyterHub + Kubernetes #14
Comments
Hi @rdelubi, Jupyer server proxy is this python package (https://github.com/jupyterhub/jupyter-server-proxy). |
@jonmmease Tried the followings: The output from infer shows none. My notebook environment:
Any thoughts what I may be missing? |
That config looks alright. If Could you post the result of: from jupyter_dash.comms import _jupyter_config
_jupyter_config run this in a cell after What URL is printed out when you run: app.run_server(mode="external") When you open that URL. What do you see? is it a 404 error, does it get stuck on What is the full URL of JupyterLab where you are running it? What is the value of Can you successfully import import jupyter_server_proxy This info should give us some clues into what's going on. Also, I don't think it would cause a problem, but I see that you have old |
Execution output of cell above
So I run a cell as app = JupyterDash(name, server_url="https://jupyterhub-<k8s namespace + domain name>/user/xxxxxx/") The output indicates port already in use
If I open another tab and go to URL at https://jupyterhub-<k8s namespace + domain name> I get the jupyterlab workspace.
Full url shown in browser is: https://jupyterhub-<k8s namespace + domain name>/user/xxxxxx/lab?
Value is "True"
Yes. Import has no error.
Uninstall it. Didn't seem to make difference though. |
Ok, well let's start with the port already in use part: Try calling def find_open_port():
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(("", 0))
_, port = s.getsockname()
s.close()
return port Call it with something like this: port = find_open_port()
print("port: {port}".format(port=port))
app.run_server(mode="external", port=port) I would expect it to print out a URL like this: |
One last idea, try setting app.run_server(mode="external", port=port, host="0.0.0.0") or app.run_server(mode="external", port=port, host="localhost") or import socket
host = socket.getfqdn();
app.run_server(mode="external", port=port, host=host) Do any of these behave differently? |
Tried all three variations. All had same output address/port already in use. |
same here |
@gioxc88 are you also running JupyterHub with Kubernetes? |
No sorry I should have specified. |
I tried to use jupyter-dash with JupyterLab and JupyterHub inside a Docker container. |
@stefaneidelloth I had the same problem, meaning that |
I see it also on lab 3.X |
I can confirm that the following docker image can run jupyter dash on z2jh with kubernetes
But I had to use a few work arounds (don't know if all of them are needed):
|
Sorry for replying the old topic, but i would like to post my solution for others since have been working on this for few days Hi, I found that it's and we need to instantiate our dash app this way |
Regarding #2, not sure which server proxy it is referring to. Can you point me to the link to the documentation?
Hi @rdelubi,
This issue is specifically concerning Colab, because Colab isn't a standard Jupyter front-end. For regular JupyterHub, it should be enough to:
jupyterlab-dash
extension is built (https://github.com/plotly/jupyter-dash#jupyterlab-support)jupyter_server_proxy
is installed in the environment running the Jupyter server.JupyterDash.infer_jupyter_proxy_config()
at the top of the notebook. This uses the JupyterLab extension to detect the URL that JupyterLab is being accessed at (This is whatserver_url
is), passes that info back to the Python library for use in configuring Dash.If that doesn't work for you, could you open a new issue? Thanks!
Originally posted by @jonmmease in #10 (comment)
The text was updated successfully, but these errors were encountered: