jupyter-plotly-dash icon indicating copy to clipboard operation
jupyter-plotly-dash copied to clipboard

Compatibility with JupyterHub

Open TiemenSch opened this issue 6 years ago • 4 comments

Would it be possible to get this to work with deployments using JupyterHub?

TiemenSch avatar Nov 21 '18 13:11 TiemenSch

It should certainly possible to get it to work, if it doesn't already.

Right now jupyter-plotly-dash is known to work with

  • jupyter-notebook
  • jupyterlab
  • binder but jupyterlab through binder doesn't work.

What happens when you try using it inside JupyterHub?

GibbsConsulting avatar Nov 22 '18 20:11 GibbsConsulting

I suspect it's the exact same as Binder,

It tries to render an iframe with a url like:

http://jupyterhub.$domain/user/$user/files/user/$user/app/endpoints/063ff1db6867437b981cc38789d1737d?1544201235585

The user's username is repeated twice. I've tried curling on similar urls (pulling out the double usernames etc) from localhost on the user's jupyter instance, can't seem to get anything

port 8050 doesn't gives me connection refused

Could you let me know a curl that you'd expect to work from localhost if the plugin renders the text:

Open in new window for /user/$user/app/endpoints/063ff1db6867437b981cc38789d1737d/

erolosty avatar Dec 07 '18 16:12 erolosty

I get 'Open in new window' URLs like /app/endpoints/c1c51597b69d435198703c704ca51ab3/ but this is only a fragment of the full URI (jupyterlab and jupyterhub both insert an additional proxy).

On my local machine, with http://localhost:8888/lab as the root for jupyterlab, the Dash app itself is served at http://localhost:8888/files/app/endpoints/c1c51597b69d435198703c704ca51ab3/ and should work from the browser (probably the quickest way to validate that its working) or curl.

I will now try with jupyterhub. Are you using any particular version?

GibbsConsulting avatar Dec 08 '18 01:12 GibbsConsulting

For me, the following steps (on a Ubuntu 16.04 machine) work:

virtualenv env -p python3.6 source env/bin/activate pip install jupyterhub jupyter-plotly-dash jupyterhub --port=9000

Then go to http://localhost:9000, login and open the JupyterDash.ipynb notebook from the repo. I find that on calculating the notebook the dash apps are rendered within the cell output windows and function as expected. I don't see a repetition of my user name in the URL.

pip freeze reports that jupyterhub version 0.9.4 is being used, along with version 0.1.1 of jupyter-plotly-dash.

delsim avatar Dec 10 '18 06:12 delsim