Streamlit doesn't reload site when code in container changes

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:

runOnSave = true
headless = true
maxUploadSize = 2000

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
COPY Pipfile* .
RUN pip install --no-cache-dir pipenv && \
     pipenv install --system --deploy --clear
COPY /app .
ENTRYPOINT ["streamlit", "run", "src/"]

And docker-compose.yml:

    build: .
      - 80:8501
      - ./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?

I’m also experiencing the same issue. My streamlit app dosent update when my file changes while running a docker image & container. How can this issue be fixed? It takes a long time to rebuild docker each time I want to see the changes go live on streamlit


# this is needed for local development with docker
# if you don't want to start the default browser:
headless = true
# you will need this for local development:
runOnSave = true
# you will need this if running docker on windows host:
fileWatcherType = "poll"

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.