FROM python:3.14-slim WORKDIR /code # Install a more comprehensive set of system dependencies RUN apt-get update && apt-get install -y \ build-essential \ libgomp1 \ libmagic1 \ python3-dev \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . # Try installing with a slightly higher timeout to prevent network drops RUN pip install --no-cache-dir --upgrade -r requirements.txt COPY . . CMD ["gunicorn", "--timeout", "120", "-b", "0.0.0.0:7860", "server:app"]