How do I serve my Panel apps on Binder?

The documentation contains information that I can use jupyter-panel-proxy

I have tried doing that for this repo https://github.com/marcskovmadsen/load-forecasts. But I cannot get it working.

I get the url https://mybinder.org/v2/gh/MarcSkovMadsen/load-forecasts/HEAD?filepath=app2.ipynb

Which does not make sense to add ??urlpath=/panel/app2 to

So I’ve tried https://mybinder.org/v2/gh/MarcSkovMadsen/load-forecasts/HEAD?urlpath=panel%2Fapp2. But it does not work either. I can see that it somehow found “Bokeh”. But stops

How do I get this working?

I have not tried, but maybe this repository can help you

1 Like

Thanks. I will look into that. The one thing it does not give me is a Nice URL.

The jupyter panel proxy ONLY serves notebooks and not files: https://github.com/holoviz/jupyter-panel-proxy/blob/master/panel_server/init.py

The notebooks MUST be servable (.servable).

Your example doesn’t work because your notebook isn’t servable your .py file is → not getting picked up by the glob.

1 Like

Thanks

And it works after I added .servable() in the app2.ipynb notebook in the root of my repo.

I can now start it via https://mybinder.org/v2/gh/MarcSkovMadsen/load-forecasts/HEAD?urlpath=panel%2Fapp2

Finally got it working with the help of @philippjfr, @WesleyTheGeolien and @xavArtley.

Please note that this required some bug fixes of Panel. It’s in the MASTER branch but not in Panel 0.11.0

Thanks.

Check out the App on Binder

Will release Panel 0.11.1 with the required fixes on Monday.

1 Like