Need help with configuration for using a Streamlit Docker container on Openshift

Does anyone know how Streamlit needs to be configured for versions 0.67 and later so that it can be run on a Docker container on Openshift without requiring write access to the root directory?

I have a small app that runs fine in a Docker container on my company’s Openshift environment for Streamlit up to version 0.66. But as soon as I upgrade Streamlit to more recent versions (no other changes to my code or other modules) it doesn’t start any more. I experimented with different Streamlit versions in my requirements.txt several times, so I am rather confident that it somehow has something to do with Streamlit’s version.

According to the Openshift log, the problem seems to be that Streamlit tries to create a /.streamlit folder in the root directory, which it can’t as it doesn’t have write access to the root folder.

Is the creation of this /.streamlit directory a new feature introduced in recent versions or has its creation location somehow changed (I’d assume in 0.67 or 0.68)?

How can I tell Streamlit e.g. in the Dockerfile or another configuration to create it somewhere else?

Thanks a lot in advance

Thomas

Got a hack from asking somewhere else…

Solution is rather simple: in the Dockerfile one can set the corresponding HOME variable as

ENV HOME="/some/directory/with/write/access"

and then my app runs again with version 0.70 :slight_smile:

1 Like

Hello,
I ran into the same problem, everything works fine until version 0.67 (included).
Then from version 0.68 on, I run into issues when deploying streamlit apps with Docker (OpenShift platform).

The suggested hack works: change the HOME directory
ENV HOME="/some/directory/with/write/access"

Thanks for the tips