# Use the official Python image FROM python:3.11-slim # Set working directory WORKDIR /app # Copy requirements COPY requirements.txt . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . # Expose the default port for Hugging Face Spaces EXPOSE 7860 ENV PORT=7860 # Run the FastAPI server CMD ["python", "server.py"]