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
├── README.md
├── requirements.txt
├── src/
└──streamlit
└── config.toml
After spending some time browsing the discussions, this was the docker file I created:
FROM python:3.8.5
WORKDIR /app
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
RUN bash -c 'echo -e "\
[server]\n\
enableCORS = false\n\
" > .streamlit/config.toml'
EXPOSE 8501
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
COPY /data/ ./data/
ENTRYPOINT ["streamlit", "run"]
CMD ["/app/src/app.py"]
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.
Hi,
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>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/streamlit/cli.py", line 173, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File "/usr/local/lib/python3.8/site-packages/streamlit/bootstrap.py", 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/config.py", line 1057, in get_config_options
_update_config_with_toml(file_contents, filename)
File "/usr/local/lib/python3.8/site-packages/streamlit/config.py", line 937, in _update_config_with_toml
for name, value in options.items():
AttributeError: 'int' object has no attribute 'items'