Opera8 commited on
Commit
867d5d2
·
verified ·
1 Parent(s): 327fad7

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # نصب ابزارهای سیستم و FFmpeg
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ git \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ WORKDIR /app
10
+
11
+ # کپی فایل نیازمندی‌ها و نصب آن‌ها
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # کپی تمام فایل‌های پروژه
16
+ COPY . .
17
+
18
+ # ایجاد پوشه‌های مورد نیاز
19
+ RUN mkdir -p uploads temp_audio
20
+
21
+ # پورت پیش‌فرض Hugging Face Spaces
22
+ EXPOSE 7860
23
+
24
+ # اجرای برنامه با Gunicorn (با پشتیبانی از Threading)
25
+ CMD ["gunicorn", "--workers", "1", "--threads", "8", "--timeout", "300", "--bind", "0.0.0.0:7860", "app:app"]