Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Install system dependencies including ffmpeg | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libgomp1 \ | |
| libgl1 \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p downloads user_tokens /tmp/flask_session temp_audio | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV ENVIRONMENT=production | |
| ENV PORT=7860 | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "600", "--log-level", "info"] | |