Streamlit workflow in Renku

We are developing a Streamlit application on RenkuLab and there’s somewhat of a workflow challenge. Presently, updating the Streamlit app requires committing and pushing code changes to a git repository, followed by pulling these changes in another session where the Streamlit app is running. This process can be time-consuming, especially during iterative development phases where frequent testing and adjustments are necessary.

Would it be possible to implement a feature that allows developers to run Streamlit applications locally within the same session? This would enable real-time testing and immediate reflection of changes without the need for repetitive commits and session restarts. We would greatly appreciate any guidance on potential solutions or workarounds to achieve this!

2 Likes

Hi @cimeister, thanks for posting your question! You can indeed do this if you set up streamlit in the same image that has jupyterlab. How are you currently setting up your image?

Here’s an example project in renku 2.0 with a launcher that uses an image which includes both jupyterlab and streamlit; the launcher opens up JupyterLab by default. You can start the streamlit server by clicking the icon once in JupyterLab. If you modify the app files, the app will automatically reload.

Hope that helps! If you’re having issues with the configuration, I’m happy to have a look at your project as well if you can share the link.

Awesome! Yes this is what I was looking for. I didn’t realize it would be as straightforward as using a different image when creating the launcher. Thanks so much!

Great!

Are you building your own image for your project? Ideally the image that you use would have all the dependencies you need pre-installed. You’re free to use the one from my project of course, but you’ll need to install all your own packages after the session launches.