FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PORT=7860 WORKDIR /app COPY requirements.txt ./ RUN python -m pip install --no-cache-dir --upgrade pip \ && python -m pip install --no-cache-dir -r requirements.txt COPY . ./ EXPOSE 7860 CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "120", "app:app"]