Opera8 commited on
Commit
9fa13c7
·
verified ·
1 Parent(s): c1c9940

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -1,33 +1,27 @@
1
  FROM python:3.10-slim
2
 
3
- # نصب FFmpeg و ابزارهای دانلود
4
  RUN apt-get update && \
5
  apt-get install -y ffmpeg wget fontconfig && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
- # --- نصب فونت‌های فارسی (لینک‌های CDN پایدار) ---
9
  RUN mkdir -p /usr/share/fonts/truetype/persian
10
-
11
- # 1. دانلود وزیرمتن (نسخه 33.003 - فایل Bold خالص)
12
- RUN wget "https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/ttf/Vazirmatn-Bold.ttf" -O /usr/share/fonts/truetype/persian/Vazirmatn-Bold.ttf
13
-
14
- # 2. دانلود لاله زار (از مخزن گوگل)
15
  RUN wget "https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/lalezar/Lalezar-Regular.ttf" -O /usr/share/fonts/truetype/persian/Lalezar.ttf
16
 
17
- # به روز رسانی کش فونت‌ها
18
  RUN fc-cache -fv
19
 
20
  WORKDIR /app
21
 
22
- # ساخت پوشه‌های لازم
23
  RUN mkdir -p /app/static /app/temp
24
 
25
  COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
  COPY . .
29
-
30
- # دسترسی نوشتن
31
  RUN chmod -R 777 /app
32
 
33
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # نصب پکیج‌های سیستمی و فونت‌ها
4
  RUN apt-get update && \
5
  apt-get install -y ffmpeg wget fontconfig && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
+ # نصب فونت‌های فارسی از CDN پایدار
9
  RUN mkdir -p /usr/share/fonts/truetype/persian
10
+ RUN wget "https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/ttf/Vazirmatn-Bold.ttf" -O /usr/share/fonts/truetype/persian/Vazirmatn.ttf
 
 
 
 
11
  RUN wget "https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/lalezar/Lalezar-Regular.ttf" -O /usr/share/fonts/truetype/persian/Lalezar.ttf
12
 
13
+ # کش کردن فونت‌ها
14
  RUN fc-cache -fv
15
 
16
  WORKDIR /app
17
 
18
+ # پوشه‌های عملیاتی
19
  RUN mkdir -p /app/static /app/temp
20
 
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
  COPY . .
 
 
25
  RUN chmod -R 777 /app
26
 
27
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]