FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ libglib2.0-0 \ libsm6 \ libxrender1 \ libxext6 \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /code # Copy project files COPY . . # Install Python dependencies RUN pip install --upgrade pip RUN pip install -r requirements.txt # Expose the port EXPOSE 7860 # Run FastAPI with Uvicorn CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]