FROM python:3.10-slim # ========================= # System dependencies # ========================= RUN apt-get update && apt-get install -y \ git \ build-essential \ cmake \ wget \ libgl1 \ && rm -rf /var/lib/apt/lists/* # ========================= # Working directory # ========================= WORKDIR /app # ========================= # Copy requirements first (cache friendly) # ========================= COPY requirements.txt . # ========================= # Install Python deps # ========================= RUN pip install --no-cache-dir --upgrade pip \ && pip install --no-cache-dir -r requirements.txt # ========================= # Copy app files # ========================= COPY . . # ========================= # Expose HF default port # ========================= EXPOSE 7860 # ========================= # Run Flask app # ========================= CMD ["python", "app.py"]