<aside> ℹ️

Renku 2.0 will allow Docker images with user-specific entry points soon. This feature will make it easier the creation of user-specific environments, including setting up Streamlit apps.

</aside>

As of now, it is still possible to launch your Streamlit app on top of your Renku 2.0 project as follows.

  1. Create a fork of this repository: https://gitlab.renkulab.io/rok.roskar/streamlit-v2-example, we will refer to the fork as project-fork.

    image.png

  2. In project-fork, modify line 8 in the file jupyter_noteboox_config.pyto the path to your python entry file for Streamlit within your Renku 2.0 project ( e.g. work/name-fork-project/helloworld.py or work/main-project-repository/streamlit/app.py or work/repository-2/app.py )

    ⚠️ Do not forget to add work/ at the beginning of the path !

    image.png

  3. Add all the package dependencies you will need to run your Renku 2.0 project in the requirements.txt file or in the environment.yml , as explained here.

    image.png

  4. Commit your changes for project-fork.

  5. Select Deploy(5a)/Container Registry(5b) on the left menu of project-fork.

  6. Click on top of your image registry to access the tags (6).

    image.png

  7. Copy the latest tagged image (registry_link).

    image.png

  8. Add a session launcher to your Renku 2.0 project the following Custom Environment set-up ****as described in How to use your own docker image for a Renku session. Consider the following two parameters:

    1. Container Image: *registry_link*
    2. Default URL: /streamlit
  9. [Optional] If the entry point for your streamlit app will be hosted in project-fork, add project-fork code repository to your Renku 2.0 project.

You can now start a session with your new streamlit launcher to access the streamlit app directly in your browser.