Is there a way to configure the app while running it as a docker image?

Hi all,

I have built an application with streamlit, which requires downloading zipped files of large outputs (500MB-1GB). I tried changing the attribute maxMessageSize to 1000 in config.toml.

The structure of the app is as follows:

├── data/ 
├── Dockerfile 
├── requirements.txt 
├── src/
    └── config.toml

After spending some time browsing the discussions, this was the docker file I created:

FROM python:3.8.5 
COPY requirements.txt . 

RUN pip install --upgrade pip 
RUN pip install --no-cache-dir -r requirements.txt  
RUN bash -c 'echo -e "\
enableCORS = false\n\
" > .streamlit/config.toml'
EXPOSE 8501 

COPY /data/ ./data/
ENTRYPOINT ["streamlit", "run"]
CMD ["/app/src/"]   

However, if the zipped file size is more than 200 MB, It throws off an error maxMessageSize exceeds 200 MB. Could anyone help me out with this?

Thanks in advance,
Apologies if this question has been previously asked, as I could not find any workaround to this.

The folder name should be .streamlit and not streamlit without a dot.

1 Like

Thank you for replying back.
I changed the name of the folder to .streamlit. However, I am facing another error.

File "/usr/local/bin/streamlit", line 8, in <module>
File "/usr/local/lib/python3.8/site-packages/click/", line 1128, in __call__
  return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/", line 1053, in main
  rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/", line 1659, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/", line 1395, in invoke
  return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/", line 754, in invoke
  return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/streamlit/", line 173, in main_run
File "/usr/local/lib/python3.8/site-packages/streamlit/", line 319, in load_config_options
  config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File "/usr/local/lib/python3.8/site-packages/streamlit/", line 1057, in get_config_options
  _update_config_with_toml(file_contents, filename)
File "/usr/local/lib/python3.8/site-packages/streamlit/", line 937, in _update_config_with_toml
  for name, value in options.items():
AttributeError: 'int' object has no attribute 'items'