Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to run a containerized streamlit app in a headless/noninteractive mode?

Streamlit server (run e.g. with streamlit run app-name.py) upon first run for each user requires interaction from her – accepting or rejecting this intro message:

  Welcome to Streamlit!

  If you are one of our development partners or are interested in
  getting personal technical support, please enter your email address
  below. Otherwise, you may leave the field blank.

  Email:

Streamlit then waits for input, failing to daemonize (run in background), which quickly causes docker containers in Kubernetes or Openshift to crash (enter the famous crash-loop back off procedure).

How to avoid such crashing, by running Streamlit in headless/noninteractive mode?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In the streamlit documentation you can find a detailed list of configurable options.
Scroll down and you will find the headless option.
Just edit the config file.

headless = true

Please also refer to this post.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading