FROM python:3.11-slim # Install system deps RUN apt-get update && apt-get install -y \ git \ curl \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy requirements first (layer cache) COPY requirements.txt . # Install Python deps RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy app COPY . . # Expose port EXPOSE 7860 # Run CMD ["python", "app.py"]