# Use official Python image FROM python:3.9-slim # Set working directory WORKDIR /app # Copy requirement and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY app ./app # Expose port (Hugging Face Spaces expects 7860) EXPOSE 7860 # Start FastAPI with uvicorn CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]