Spaces:
Build error
Build error
Download Dockerfile from khurrameycon/TTS_API_Image_fallback: direct link, hf CLI and curl.
- Browser
- Download file 844 Bytes
-
https://huggingface.co/spaces/khurrameycon/TTS_API_Image_fallback/resolve/14dc139471bf59ddd76d350bf81972e00a6f7c71/Dockerfile
- Command line
-
hf download hf://spaces/khurrameycon/TTS_API_Image_fallback@14dc139471bf59ddd76d350bf81972e00a6f7c71/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/khurrameycon/TTS_API_Image_fallback/resolve/14dc139471bf59ddd76d350bf81972e00a6f7c71/Dockerfile
844 Bytes
| FROM python:3.9-slim | |
| # 1. Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| espeak-ng \ | |
| libsndfile1 \ | |
| git # Needed for installing from git | |
| # 2. Configure environment | |
| ENV HF_HOME=/app/cache \ | |
| XDG_CACHE_HOME=/app/cache \ | |
| PYTHONPATH="${PYTHONPATH}:/app" | |
| # 3. Create directories with proper permissions | |
| RUN mkdir -p /app/cache && \ | |
| chmod -R 777 /app | |
| WORKDIR /app | |
| # 4. Install Python dependencies | |
| COPY requirements.txt . | |
| # First install setup tools | |
| RUN pip install --upgrade pip setuptools wheel | |
| # Install misaki with proper data files | |
| RUN pip install "misaki[ja,zh] @ git+https://github.com/uezo/misaki.git" | |
| # Then install other requirements | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 5. Copy application code | |
| COPY . . | |
| # 6. Run FastAPI | |
| CMD uvicorn app:app --host 0.0.0.0 --port 7860 |