deppen8
deppen8

Reputation: 153

Showing Bokeh plots in Binder

I have a simple Jupyter Notebook that produces a bokeh plot from a pandas dataframe with some associated bokeh widgets. When I run it in both Jupyter Notebook and Lab, it outputs the plot and widgets and is interactive as designed. However, when I put those same files in a GitHub repo (https://github.com/deppen8/leiap_dashboard) and ran Binder, the output plot and widgets are not displayed.

My requirements.txt is simple:

pandas
bokeh

My postBuild is also simple:

jupyter labextension install jupyterlab_bokeh
jupyter trust survey_dashboard.ipynb

Am I missing something in these files to make bokeh (with widgets) work with Binder? Or is there something fundamentally incompatible about the bokeh widgets?

Upvotes: 0

Views: 383

Answers (2)

juniper-
juniper-

Reputation: 6552

How about this example using nbserverproxy?

https://mybinder.readthedocs.io/en/latest/sample_repos.html#running-a-bokeh-server-with-binder

Upvotes: 2

bigreddot
bigreddot

Reputation: 34568

Bokeh server apps, such as the one embedded in the notebook you link to, required the ability to open and maintain a websocket connection to the client. It's entirely possible that Binder is running behind some sort of proxy such as Nginx, and that they do not automatically proxy websocket connections. You might take things up with Binder support to ask them if this is the case or if there is any network configuration change they can make on their end.

Upvotes: 1

Related Questions