Error during deployment with environment.yml

Hello! I was trying to deploy an app using environment.yml to install packages with conda and I encountered a problem I hope you might help with! While processing dependencies the terminal shows an error “installer returned a non-zero exit code” with “Collecting package metadata (repodata.json): …working… [2023-03-20 13:37:31.691295] bash: line 3: 34 Killed /home/appuser/.conda/bin/conda env update -n base --file environment.yml”
I tried rebooting and deleting and recreating the app several times but It seems it does not work. May you please help? Thank you!

Unfortunately, this is not sufficient information with which one could somehow help.
Please share the link to your public github repo.

Of course, I’m sorry for the inconvenient, I share the link to the github repo: https://github.com/cami3/microbiome, where the app script is progetto_dashboard_microbioma.py.

Delete or rename the environment.yml file, as it takes precedence over the requirements.txt file.

Thank you for the attention, infortunatevi I am not able to reproduce the environment locally using the requirements.txt file because of a package that is online available through conda. World there be a workaround for this?

Thank you for the attention!, unfortunately I am not able to reproduce the environment locally using the requirements.txt file because of a package that is only available through conda. Would there be a workaround for this?

Which package?

You can use the environment.yml file, but you have to declutter it, it is crammed with unnecessary and probably unavailable packages.

Thank you, the package is an analysis package named qiime2 which I used in the app, that is installed using conda as described in https://docs.qiime2.org/2023.2/install/native/ . I used the same .yml file to replicate the environment and added the other packages as pip dependecies.

There are typos/non-existing packages in this part

Everything works fine locally: the environment.yml seems to be fully functional when conda env create --name my_env --file environemnt.yml is called, what could be done to avoid the terminal showing the error bash: line 3: 17 Killed /home/appuser/.conda/bin/conda env update -n base --file environment.yml
?

Well, this is probably the most used sentence here in the forum… :neutral_face:
Unfortunately, this is not how you successfully deploy apps for a cloud environment…
Your environment.yml file is crammed with unnecessary and probably non-installable packages.
I spotted macosx specific packages for example.
This will never deploy successfully on streamlit cloud.
Cleanup this file, delete everything you don’t actually import in your application and try again.

This is not enough information to give any advice at all.
There must be more in the web console?

Thank you, the console just shows this error "Collecting package metadata (repodata.json): …working… [2023-03-21 17:43:22.477892] bash: line 3: 17 Killed /home/appuser/.conda/bin/conda env update -n base --file environment.yml

installer returned a non-zero exit code

Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

Streamlit server consistently failed status checks

Please fix the errors, push an update to the git repo, or reboot the app."
Since it works fine also as a docker image, may there be a way to deploy the dockerized app to streamlit? Thanks a lot
Camilla

Afaik this is not possible on streamlit cloud.
But you can try other cloud providers, which offer containerized environments.

But your Dockerfile is built differently and has other dependencies.
Just compare these two files:

  • qiime2-2023.2-py38-linux-conda.yml
  • environment.yml

They are not identical and the latter also contains macosx dependencies. This will definitely not work in Docker either!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.