FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy and install requirements COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY . . # Expose port EXPOSE 7860 # Start the API CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]