FROM python:3.10-slim # Prevents Python from writing .pyc files ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Working directory WORKDIR /app # System deps (Pillow needs these) RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ libjpeg-dev \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY . . # Expose the port Streamlit will run on EXPOSE 7860 # Streamlit entrypoint CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]