# Use official Python image FROM python:3.10-slim # Set working directory WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . # Install dependencies RUN pip install --upgrade pip \ && pip install --no-cache-dir -r requirements.txt # Copy the app code COPY . . # Expose port 8000 EXPOSE 8000 # Run the FastAPI app with uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]