Opera8 commited on
Commit
b74ea70
·
verified ·
1 Parent(s): cff1609

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,25 +1,25 @@
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
- # --- نصب فونت‌های حرفه‌ای فارسی ---
9
  RUN mkdir -p /usr/share/fonts/truetype/persian
10
 
11
- # 1. وزیر متن (متن اصلی)
12
- RUN wget https://github.com/google/fonts/raw/main/ofl/vazirmatn/Vazirmatn-Bold.ttf -O /usr/share/fonts/truetype/persian/Vazirmatn-Bold.ttf
13
 
14
- # 2. لاله زار (تیتر فانتزی)
15
- RUN wget https://github.com/google/fonts/raw/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 .
@@ -27,7 +27,7 @@ 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
+ # نصب 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 .
 
27
 
28
  COPY . .
29
 
30
+ # دسترسی نوشتن
31
  RUN chmod -R 777 /app
32
 
33
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]