FROM python:3.9-slim # Set working directory WORKDIR /app # Install build tools and required system libraries RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ gcc \ g++ \ libffi-dev \ libpq-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* # Copy and install Python dependencies COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt # Copy app files COPY . . # Streamlit-specific settings EXPOSE 8501 CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]