ek-5 commited on
Commit
01f4fe7
·
verified ·
1 Parent(s): 8a17510

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.9-slim
3
+ # تثبيت مكتبات النظام اللازمة لـ YOLO و OpenCV
4
+ RUN apt-get update && apt-get install -y \
5
+ libgl1-mesa-glx \
6
+ libglib2.0-0 \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ WORKDIR /app
10
+
11
+ # نسخ وتثبيت المكتبات
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # نسخ ملفات المشروع (تأكدي من وجود app.py و best.pt)
16
+ COPY . .
17
+
18
+ # تشغيل السيرفر على المنفذ المخصص لهجينج فيس
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]