Deploy Streamlit in JupyterHub

To showcase Streamlit apps to non-technical clients or colleagues, I think it makes sense to use the established authentication and hosting infrastructure provided by JupyterHub.

It’s possible just to run the Streamlit app where normally a Jupyter notebook runs instead, and I’ve been working on ways to make this easier.

Your Streamlit app can require users to authenticate via JupyterHub - and the user system of JupyterHub is very flexible, e.g. can be based on corporate email single-sign-on.

There’s no need for the ‘Jupyter’ part to put you off just because you’re deploying a Streamlit app! And using JupyterHub means that you and other team members can also continue to use Jupyter notebooks through the same infrastructure if desired.

I’ve written up a basic ‘proof of concept’ guide to setting up a JupyterHub installation to do this:

Please let me know your thoughts!

8 Likes