FROM docker.io/library/python:3.13.5-slim@sha256:4c2cf9917bd1cbacc5e9b07320025bdb7cdf2df7b0ceaccb55e9dd7e30987419 # Install build dependencies and Git. RUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/* # Set the working directory inside the container. WORKDIR /app # Create the .streamlit directory and copy the secrets.toml file from the host. # This approach avoids permission issues and ensures the folder exists. RUN mkdir /.streamlit # Copy the Streamlit configuration files directly into the created directory. COPY requirements.txt . COPY src/app.py src/ COPY .streamlit/secrets.toml /.streamlit/secrets.toml COPY .streamlit/config.toml /.streamlit/config.toml # Install Python dependencies. RUN pip install -r requirements.txt # Expose port 8501 for Streamlit. EXPOSE 8501 # The command to run the Streamlit application. CMD ["streamlit", "run", "src/app.py"]