Download Dockerfile from yash184/coding: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/yash184/coding/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/yash184/coding/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/yash184/coding/resolve/main/Dockerfile
1.1 kB
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR /home/user/app | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu | |
| # Hindi config ko "append_terminal_punctuation: false" chahiye, isliye GitHub ka latest pocket-tts | |
| RUN pip install --no-cache-dir "git+https://github.com/kyutai-labs/pocket-tts.git" \ | |
| fastapi "uvicorn[standard]" numpy huggingface_hub | |
| # config.yaml local folder me, weights aur tokenizer HF cache me (build time par hi download) | |
| RUN python -c "from huggingface_hub import hf_hub_download as d; r='saryps-labs/pocket-tts-hindi'; d(r,'config.yaml',local_dir='/home/user/hindi_model'); d(r,'model.safetensors'); d(r,'tokenizer.model')" || true | |
| COPY --chown=user . /home/user/app | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |