FROM python:3.9-slim # نصب ابزارهای سیستم و FFmpeg RUN apt-get update && apt-get install -y \ ffmpeg \ git \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # کپی فایل نیازمندی‌ها و نصب آن‌ها COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # کپی تمام فایل‌های پروژه COPY . . # ایجاد پوشه‌های مورد نیاز RUN mkdir -p uploads temp_audio # پورت پیش‌فرض Hugging Face Spaces EXPOSE 7860 # اجرای برنامه با Gunicorn (با پشتیبانی از Threading) CMD ["gunicorn", "--workers", "1", "--threads", "8", "--timeout", "300", "--bind", "0.0.0.0:7860", "app:app"]