gijl commited on
Commit
fecb5cf
·
verified ·
1 Parent(s): b386df6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
- # تثبيت المكتبات المطلوبة
 
 
 
 
 
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- # نسخ ملفات المشروع
10
  COPY main.py .
11
  COPY index.html .
12
 
13
- # فتح المنفذ الافتراضي لمساحات Hugging Face
14
  EXPOSE 7860
15
 
16
- # تشغيل خادم FastAPI
17
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.9-slim
2
 
3
+ # تعيين المجلد الرئيسي
4
  WORKDIR /app
5
 
6
+ # الخطوة الأهم: تحديث النظام وتثبيت git
7
+ RUN apt-get update && apt-get install -y \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # نسخ ملف المتطلبات وتثبيته
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # نسخ بقية الملفات
16
  COPY main.py .
17
  COPY index.html .
18
 
19
+ # فتح المنفذ
20
  EXPOSE 7860
21
 
22
+ # تشغيل الخادم
23
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]