FROM python:3.9 # Set working directory WORKDIR /app # Install system dependencies for OpenCV RUN apt-get update && apt-get install -y libgl1 && apt-get clean && rm -rf /var/lib/apt/lists/* COPY .git .git # ─── Install Git LFS & fetch the real model file ──────────────────────── RUN apt-get update \ && apt-get install -y git-lfs libgl1 \ && git lfs install \ && git lfs pull \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Copy application files COPY . /app # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose the port EXPOSE 7860 # Command to start Uvicorn CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]