# syntax=docker/dockerfile:1 FROM python:3.11-slim # Set working directory WORKDIR /app # Install dependencies first (layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application source COPY . . # Expose the default API port EXPOSE 7860 # Run the application CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"]