Vineeth Sai commited on
Commit
f05c22e
·
1 Parent(s): 36501d4

Fix spaCy error: install en_core_web_sm; keep static perms

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -1
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
  espeak-ng ffmpeg libsndfile1 git build-essential \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Create an unprivileged user and give it ownership of /app and caches
19
  RUN useradd -m -u 1000 appuser && \
20
  mkdir -p /app /cache/hf /cache/torch && \
21
  chown -R appuser:appuser /app /cache
@@ -26,6 +26,9 @@ WORKDIR /app
26
  COPY --chown=appuser:appuser requirements.txt .
27
  RUN pip install --upgrade pip && pip install -r requirements.txt
28
 
 
 
 
29
  # Copy the app code
30
  COPY --chown=appuser:appuser . .
31
 
 
15
  espeak-ng ffmpeg libsndfile1 git build-essential \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Create unprivileged user and caches
19
  RUN useradd -m -u 1000 appuser && \
20
  mkdir -p /app /cache/hf /cache/torch && \
21
  chown -R appuser:appuser /app /cache
 
26
  COPY --chown=appuser:appuser requirements.txt .
27
  RUN pip install --upgrade pip && pip install -r requirements.txt
28
 
29
+ # Install spaCy English model now (prevents runtime download)
30
+ RUN python -m spacy download en_core_web_sm
31
+
32
  # Copy the app code
33
  COPY --chown=appuser:appuser . .
34
 
requirements.txt CHANGED
@@ -14,3 +14,4 @@ numpy>=1.24.0
14
  scipy>=1.10.0
15
  librosa>=0.10.0.post2
16
  huggingface-hub>=0.23.0
 
 
14
  scipy>=1.10.0
15
  librosa>=0.10.0.post2
16
  huggingface-hub>=0.23.0
17
+ spaCy