Spaces:
Runtime error
Runtime error
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libsndfile1 \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip to the latest version | |
| RUN pip install --upgrade pip | |
| # Install numpy first (as it's a common dependency) | |
| RUN pip install --no-cache-dir numpy==1.22.0 | |
| # Install scipy (depends on numpy) | |
| RUN pip install --no-cache-dir scipy>=1.11.2 | |
| # Install torch and torchaudio | |
| RUN pip install --no-cache-dir torch>=2.0.1 torchaudio>=2.0.2 | |
| # Install librosa and soundfile | |
| RUN pip install --no-cache-dir librosa>=0.10.1 soundfile>=0.12.1 | |
| # Install gradio | |
| RUN pip install --no-cache-dir gradio==4.36.1 | |
| # Install TTS last | |
| RUN pip install --no-cache-dir TTS==0.22.0 | |
| # Copy application code | |
| COPY app.py . | |
| COPY README.md . | |
| # Create directory for uploaded files | |
| RUN mkdir -p uploads | |
| # Expose port for Gradio | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "app.py"] |