Skydata001 commited on
Commit
e8721dc
·
verified ·
1 Parent(s): 67cf072

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -13
Dockerfile CHANGED
@@ -1,22 +1,22 @@
1
- FROM python:3.10-slim
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- # تثبيت الحزم الأساسية للنظام ومعالجة الصور
6
- RUN apt-get update && apt-get install -y \
7
- libgl1-mesa-glx \
8
- libglib2.0-0 \
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 . .
17
 
18
- # منفذ التشغيل لـ Hugging Face Spaces
19
  EXPOSE 7860
20
 
21
- # تشغيل تطبيق FastAPI
22
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV PIP_NO_CACHE_DIR=1
6
 
7
  WORKDIR /app
8
 
9
+ RUN apt-get update \
10
+ && apt-get install -y --no-install-recommends fonts-dejavu-core \
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ COPY requirements.txt /app/requirements.txt
14
+
15
+ RUN pip install --no-cache-dir -r /app/requirements.txt
16
 
17
+ COPY app.py /app/app.py
18
+ COPY index.html /app/index.html
19
 
 
20
  EXPOSE 7860
21
 
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]