Update Dockerfile
Browse files- Dockerfile +4 -5
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 |
-
|
| 5 |
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
USER user
|
|
@@ -13,11 +13,10 @@ 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 "
|
| 17 |
-
fastapi "uvicorn[standard]" numpy huggingface_hub
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
RUN python -c "from
|
| 21 |
|
| 22 |
COPY --chown=user . /home/user/app
|
| 23 |
|
|
|
|
| 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 |
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 |
|