yash184 commited on
Commit
21f0309
·
verified ·
1 Parent(s): 4ea5aa2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  FROM python:3.11-slim
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
- espeak-ng libsndfile1 git && rm -rf /var/lib/apt/lists/*
5
 
6
  RUN useradd -m -u 1000 user
7
  USER user
@@ -13,10 +13,12 @@ WORKDIR /home/user/app
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
  pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
15
 
16
- RUN pip install --no-cache-dir "kokoro>=0.9.4" soundfile numpy fastapi "uvicorn[standard]"
 
 
17
 
18
- # Model aur Hindi voices build time par download (fail ho to runtime par ho jayega)
19
- RUN python -c "from kokoro import KPipeline; p=KPipeline(lang_code='h', repo_id='hexgrad/Kokoro-82M'); p.load_voice('hf_alpha'); p.load_voice('hm_omega')" || true
20
 
21
  COPY --chown=user . /home/user/app
22
 
 
1
  FROM python:3.11-slim
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ git ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
5
 
6
  RUN useradd -m -u 1000 user
7
  USER user
 
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
  pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
15
 
16
+ # Hindi config ko "append_terminal_punctuation: false" chahiye, isliye GitHub ka latest pocket-tts
17
+ RUN pip install --no-cache-dir "git+https://github.com/kyutai-labs/pocket-tts.git" \
18
+ fastapi "uvicorn[standard]" numpy huggingface_hub
19
 
20
+ # config.yaml local folder me, weights aur tokenizer HF cache me (build time par hi download)
21
+ 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
22
 
23
  COPY --chown=user . /home/user/app
24