Download Dockerfile from GradTeam/Final_App: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/spaces/GradTeam/Final_App/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/GradTeam/Final_App/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/GradTeam/Final_App/resolve/main/Dockerfile
761 Bytes
| FROM python:3.10-slim | |
| # 2. تثبيت مكتبات النظام الضرورية لـ YOLO | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # 3. تثبيت نسخة تورش الخفيفة (هذا هو مفتاح الحل) | |
| RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| # 4. تثبيت بقية المكتبات (بدون تحديد إصدارات معقدة لترك الخيار للنظام) | |
| RUN pip install --no-cache-dir ultralytics transformers fastapi uvicorn python-multipart pillow | |
| # 5. نسخ بقية الملفات | |
| COPY . . | |
| # 6. التشغيل | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |