Hi all. In our build process using streamlit we are trying to use the config.toml to specify all configs rather than specify configs in the start command. At build time it’s not really clear who the user will be so the path expansion of “~/.streamlit/config” will not mach the user’s expansion of “~/.streamlit/config” at runtime. I was wondering if it were possible to allow for a global config path such as /etc/.streamlit/config similar to how pip allows here. This will allow for configs to be set regardless of the user. Thank you!
Hey @scottweitzner, Welcome to the community,
I think you are looking for $CWD/.streamlit/config.toml, Check this link, You can place the config.toml in the directory where you are running streamlit from and the config will be picked up irrespective of the user.
Hope it helps!
Thank you for the warm welcome @ash2shukla!
I originally thought this may work too but unfortunately we don’t have a way of knowing which direcctory the user will be launching streamlit from and don’t want to have each user copy a config file into their workspace. Does this method work regardless of where the main python file is?
for instance if i always run streamlit using the binary from
could i put the config in /usr/local/anaconda/…/bin and just run all files like so:
cd /usr/local/anaconda/.../bin && streamlit run /path/to/main.py
I would prefer having a directory structure somewhat like this for my app and tell users to clone the project and execute streamlit run from the cloned repo,
cd mypp/ and streamlit run main.py