FROM python:3.11-slim WORKDIR /app # Make Python output unbuffered so logs show up immediately. ENV PYTHONUNBUFFERED=1 COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt COPY app.py /app/app.py EXPOSE 7860 # Exec-form CMD (PID 1 = uvicorn process) CMD ["python", "-u", "/app/app.py"]