Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Ko-TTS-Arena Contributors
fix: Add ffmpeg to Docker, disable Gemini TTS (requires OAuth2), keep REST API code for future
b0bdfc9
| # Hugging Face Spaces Docker | |
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| wget \ | |
| curl \ | |
| git \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV HOME="/home/user" | |
| WORKDIR /app | |
| # Copy requirements first for better caching | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy application files | |
| COPY --chown=user . /app | |
| # Create necessary directories | |
| RUN mkdir -p /app/instance /app/tts_cache /app/audio_cache | |
| # Set environment variables for HF Spaces | |
| ENV FLASK_ENV=production | |
| ENV IS_SPACES=true | |
| ENV PORT=7860 | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run with waitress (already in requirements.txt) | |
| CMD ["python", "app.py"] | |