# Use a lightweight Python image FROM python:3.10-slim # Set working directory WORKDIR /app # Install OS-level dependencies RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/* # Copy your project files into the container COPY . . # Upgrade pip and install Python dependencies RUN pip install --upgrade pip RUN pip install -r requirements.txt # Expose the port Hugging Face Spaces expects EXPOSE 7860 # Run the FastAPI app CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]