FROM python:3.10-slim WORKDIR /app RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . EXPOSE 7860 ENV PORT=7860 ENV PYTHONUNBUFFERED=1 ENV HF_HOME=/tmp/huggingface CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "--timeout", "300", "--access-logfile", "-", "app:app"]