I’m running my streamlit app inside debian docker container on prod and debugging on Windows locally. I created config.toml which I put inside .streamlit
folder located in workdir. It’s content:
[server]
runOnSave = true
headless = true
maxUploadSize = 2000
[browser]
gatherUsageStats = false
When I run the app locally, it automatically reloads when code changes are made. But when it runs from container, it doesn’t. This is my dockefile:
# syntax=docker/dockerfile:1
FROM python:3.10-slim-bookworm
RUN apt-get update && apt-get install -y \
ffmpeg libsm6 libxext6
WORKDIR /app
COPY Pipfile* .
RUN pip install --no-cache-dir pipenv && \
pipenv install --system --deploy --clear
COPY /app .
VOLUME /app
ENTRYPOINT ["streamlit", "run", "src/main.py"]
EXPOSE 8501
And docker-compose.yml
:
services:
app:
build: .
ports:
- 80:8501
volumes:
- ./app:/app
I make changes locally and volume transfer updated files to container. I can see updated files in container’s files panel through docker desktop.
Could you tell, please, why it doesn’t automatically reload?