Streamlit App Deployment Errors due to environment.yml

Link to repo: GitHub - ShaheerSyed/mdsimulation-streamlit

Hi, I am not sure why there is an error in deploying my app. I have tried various solutions, none which actually worked.

The main issue is that I have three libraries that I need, but are only from conda. (openmm, mdtraj, and parmed).

So, I created a environment.yml file.
Does streamlit not support conda-forge ?

I keep getting this error (I believe its because of the conda-forge channel):

Collecting package metadata (repodata.json): ...working... [2023-12-03 01:23:24.253950] bash: line 3:    11 Killed                  /home/adminuser/.conda/bin/conda env update -n base --file environment.yml
[01:23:24] ❗️ installer returned a non-zero exit code
[01:23:24] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[01:24:57] ❗️ Streamlit server consistently failed status checks
[01:24:57] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

hey hi ! i would be awesome if you refer me some of code source or deploy link github repo etc for more detailed analysis.
check your requirement.txt includes all the dependency

requests==2.26.0
numpy==1.21.2
pandas==1.3.3
flask==2.1.1
pip install -r requirements.txt

I have attached the link to my github repo at the top of my previous message. Here it is again. GitHub - ShaheerSyed/mdsimulation-streamlit

There has been reports of conda using a lot of memory to create environments, even more so when using conda-forge. Note that streamlit cloud memory is limited to 1 GB.

Not being a conda user I cannot be of much help, but hopefully you can conduct your own research on this.

  1. remove the environment.yml file
  2. use the requirements.txt file below :arrow_down:
  3. reboot the app

requirements.txt

numpy
pandas
matplotlib
plotly
MDAnalysis
openmm
parmed
scikit-learn
streamlit
streamlit-molstar
requests

Thanks @Franky1 and @Goyo

I believe you are correct that the issue is due to cloud memory.

Perhaps – correct me if I am wrong – if I try to deploy somewhere else (Azure, AWS, etc…) it may work. I’ll have to look into how to do this, but I guess the experience gained from manually deploying an app may be valuable for future endeavors.

The issue with the requirements.txt file is predominantly the openmm package. Installing by pip does not seem to load in the correct modules. The app does depoy successfully but I get a openmm module not found error when trying to import in the streamlit_app.py file.

Thanks, nonetheless.

Deploying to a host with more memory can help. You can also search the internet for ways to mitigate the conda memory issue. I have seen it discused in StackOverflow and the conda issue tracker.

You’re right, this seems to be an old outdated library on pypi…