Spaces:
Build error
Build error
| # استخدام نسخة بايثون رسمية | |
| FROM python:3.9-slim | |
| # تثبيت كل حزم النظام اللازمة لتشغيل OpenCV و YOLO على اللينكس بدون مشاكل | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| libxcb1 \ | |
| libx11-xcb1 \ | |
| libxcb-icccm4 \ | |
| libxcb-image0 \ | |
| libxcb-keysyms1 \ | |
| libxcb-randr0 \ | |
| libxcb-render-util0 \ | |
| libxcb-render0 \ | |
| libxcb-shape0 \ | |
| libxcb-xfixes0 \ | |
| libxkbcommon-x11-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # تحديد مسار العمل | |
| WORKDIR /code | |
| # نسخ ملف المكتبات وتثبيتها | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # نسخ باقي ملفات المشروع | |
| COPY . . | |
| # تشغيل السيرفر على البورت المطلوب | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |