FROM python:3.11-slim WORKDIR /code # Install dependencies first (better layer caching - only reinstalls if requirements.txt changes) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code and artifacts COPY app ./app COPY artifacts ./artifacts EXPOSE 8000 CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]