FROM python:3.10-slim WORKDIR /app ENV PYTHONUNBUFFERED=1 COPY requirements.txt . # ADD THIS LINE: Upgrade pip first! RUN pip install --no-cache-dir --upgrade pip # Then install the requirements RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]