FROM python:3.11-slim WORKDIR /app # System dependencies RUN apt-get update && apt-get install -y \ gcc \ g++ \ libgl1 \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* # Copy requirements first COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy project files COPY . . # Port EXPOSE 8000 # Run FastAPI CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]