xxparthparekhxx commited on
Commit
ce950e1
·
1 Parent(s): 64801d5

fixed lang bugs

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -4
  2. requirements.txt +6 -2
Dockerfile CHANGED
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  && git lfs install \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # ── Create app user (HuggingFace Spaces runs as non-root) ─────────────────────
16
  RUN useradd -m -u 1000 appuser
17
  WORKDIR /app
18
 
@@ -21,6 +21,9 @@ COPY requirements.txt .
21
  RUN pip install --no-cache-dir --upgrade pip \
22
  && pip install --no-cache-dir -r requirements.txt
23
 
 
 
 
24
  # ── App files ─────────────────────────────────────────────────────────────────
25
  COPY --chown=appuser:appuser main.py .
26
  COPY --chown=appuser:appuser static/ ./static/
@@ -31,11 +34,10 @@ RUN mkdir -p /app/audio_output && chown -R appuser:appuser /app
31
  # ── Switch to non-root user ────────────────────────────────────────────────────
32
  USER appuser
33
 
34
- # ── Cache model weights at build time ─────────────────────────────────────────
35
- # This bakes the model into the image so cold starts are fast.
36
  RUN python -c "from kokoro import KModel; KModel(repo_id='hexgrad/Kokoro-82M')" || true
37
 
38
- # ── Expose port (HuggingFace expects 7860) ────────────────────────────────────
39
  EXPOSE 7860
40
 
41
  # ── Start server ───────────────────────────────────────────────────────────────
 
12
  && git lfs install \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # ── Create app user ────────────────────────────────────────────────────────────
16
  RUN useradd -m -u 1000 appuser
17
  WORKDIR /app
18
 
 
21
  RUN pip install --no-cache-dir --upgrade pip \
22
  && pip install --no-cache-dir -r requirements.txt
23
 
24
+ # ✅ Install spaCy English model PROPERLY (this fixes a/b pipelines)
25
+ RUN python -m spacy download en_core_web_sm
26
+
27
  # ── App files ─────────────────────────────────────────────────────────────────
28
  COPY --chown=appuser:appuser main.py .
29
  COPY --chown=appuser:appuser static/ ./static/
 
34
  # ── Switch to non-root user ────────────────────────────────────────────────────
35
  USER appuser
36
 
37
+ # ── Cache model weights ────────────────────────────────────────────────────────
 
38
  RUN python -c "from kokoro import KModel; KModel(repo_id='hexgrad/Kokoro-82M')" || true
39
 
40
+ # ── Expose port ────────────────────────────────────────────────────────────────
41
  EXPOSE 7860
42
 
43
  # ── Start server ───────────────────────────────────────────────────────────────
requirements.txt CHANGED
@@ -13,5 +13,9 @@ numpy>=1.26.0
13
  huggingface-hub>=0.26.0
14
  transformers>=4.45.0
15
 
16
- # Audio extras (for mp3 export)
17
- pydub>=0.25.1
 
 
 
 
 
13
  huggingface-hub>=0.26.0
14
  transformers>=4.45.0
15
 
16
+ # Audio extras
17
+ pydub>=0.25.1
18
+
19
+ spacy>=3.8.0
20
+ pyopenjtalk>=0.3.3
21
+ ordered-set>=4.1.0