Spaces:
Build error
Build error
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| espeak-ng \ | |
| nginx \ | |
| git \ | |
| build-essential \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| # Install numpy and cython first to fix pyworld build issues | |
| RUN pip install --no-cache-dir numpy==1.23.5 cython | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Create cache directory for models and set permissions | |
| RUN mkdir -p models_cache && chmod 777 models_cache | |
| # Copy Nginx configuration | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| # Copy start script and make it executable | |
| COPY start.sh . | |
| RUN chmod +x start.sh | |
| # Expose port 7860 (Hugging Face Spaces default) | |
| EXPOSE 7860 | |
| # Run the start script | |
| CMD ["./start.sh"] | |