midokhaled927 commited on
Commit
19495b5
·
verified ·
1 Parent(s): 6ad1c23

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,7 +1,8 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  libgl1-mesa-glx \
7
  libglib2.0-0 \
@@ -10,15 +11,25 @@ RUN apt-get update && apt-get install -y \
10
  libxrender-dev \
11
  libgomp1 \
12
  wget \
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
15
  COPY requirements.txt .
16
- RUN pip install --no-cache-dir -r requirements.txt
17
 
 
 
 
 
 
 
18
  COPY . .
19
 
20
  # تحويل الموديل إلى TFLite عند بناء الصورة
21
- RUN python convert_to_tflite.py
22
 
 
23
  EXPOSE 7860
 
 
24
  CMD ["python", "app.py"]
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
+ # تثبيت dependencies النظام
6
  RUN apt-get update && apt-get install -y \
7
  libgl1-mesa-glx \
8
  libglib2.0-0 \
 
11
  libxrender-dev \
12
  libgomp1 \
13
  wget \
14
+ git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # نسخ ملف المتطلبات
18
  COPY requirements.txt .
 
19
 
20
+ # تثبيت مكتبات Python مع تجاهل التحذيرات
21
+ RUN pip install --no-cache-dir --upgrade pip && \
22
+ pip install --no-cache-dir -r requirements.txt && \
23
+ pip install --no-cache-dir gradio==5.4.0 uvicorn websockets
24
+
25
+ # نسخ باقي الملفات
26
  COPY . .
27
 
28
  # تحويل الموديل إلى TFLite عند بناء الصورة
29
+ RUN python convert_to_tflite.py || echo "⚠️ Skipping model conversion"
30
 
31
+ # فتح منفذ Gradio
32
  EXPOSE 7860
33
+
34
+ # تشغيل التطبيق
35
  CMD ["python", "app.py"]