pcb-defect-detector-project/Finql-Project
0
1FROM python:3.10-slim2 3# تثبيت مكتبات النظام المطلوبة4RUN apt-get update && apt-get install -y \5 libglib2.0-0 \6 libsm6 \7 libxext6 \8 libxrender1 \9 libgomp1 \10 && rm -rf /var/lib/apt/lists/*11 12ENV PYTHONUNBUFFERED=113ENV PORT=786014 15WORKDIR /app16 17COPY requirements.txt .18RUN pip install --no-cache-dir -r requirements.txt19 20# إزالة opencv-python العادي وتثبيت headless21RUN pip uninstall -y opencv-python opencv-contrib-python || true && \22 pip install --no-cache-dir opencv-python-headless==4.10.0.8423 24# نسخ جميع الملفات والمجلدات25COPY app.py .26COPY last.pt .27COPY models/ ./models/28COPY core/ ./core/29COPY utils/ ./utils/30COPY routes/ ./routes/31COPY templates/ ./templates/32 33EXPOSE $PORT34 35CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port $PORT"]