Specify requirements.txt

I am using Streamlit to make a monitoring dashboard for my ml model. I have created a separate dashboard-requirements.txt file for that. Is there a way I can specify streamlit cloud to use this. When creating the app, it doesn’t show any option and by default goes for requirements.txt

Hi there @ishandandekar ,

In Streamlit Community Cloud, the name of requirements file for the Streamlit app must be requirements.txt. You can always rename the other requirements files you might have (e.g, requirements-model.txt)

There is no other way?

Where ist the problem?

https://docs.streamlit.io/streamlit-community-cloud/get-started/deploy-an-app/app-dependencies

I already have a requirements.txt that I am using for my machine learning model workflow that has libraries that do not help in making the dashboard. I was thinking of creating a different requirements.txt which only has dependencies for the dashboard only, hence the question. Is there a way I can do this? Else, can I deploy the app as a Docker container?

Hey @ishandandekar ,

At this point, I’d suggest 2 solutions.

1.) Merge both files together. I don’t see why you have an issue merging both requirements.txt files together into 1 requirements.txt. This would help provide libraries for both parts of your app and reduce space needed on the server.

2.) If you’re super specific about having a different requirements.txt files, just create 2 different apps and embed them together. Feel free to check this documentation out: Embed your app - Streamlit Docs

This way, you’d have your files sorted out and be more organized. Though, I would recommend the 1.) solution in case you are transferring data through both components without any api routes.

As a hack, I was thinking to make a branch with just the modules and codes for the dashboard. Will this work? I think streamlit supports to serve code from any branch of the repo. I don’t know if this is a good practice or not. Please notify if you see any problem with this solution!