khurrameycon commited on
Commit
c7a589d
·
verified ·
1 Parent(s): c9ee0f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -11,11 +11,13 @@ ENV HF_HOME=/app/cache \
11
  XDG_CACHE_HOME=/app/cache \
12
  PYTHONPATH="${PYTHONPATH}:/app"
13
 
14
- # 3. Create all required directories with proper permissions
15
  RUN mkdir -p /app/cache/hub/models--hexgrad--Kokoro-82M && \
16
  mkdir -p /app/cache/hub/.locks/models--hexgrad--Kokoro-82M && \
 
17
  chmod -R 777 /app && \
18
- chmod -R 777 /app/cache/hub/.locks
 
19
 
20
  WORKDIR /app
21
 
@@ -28,6 +30,9 @@ RUN pip install --upgrade pip setuptools wheel
28
  # Then install other requirements
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
 
 
 
31
  # Pre-download the model with explicit permissions
32
  RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download('hexgrad/Kokoro-82M', 'config.json')" || true && \
33
  chmod -R 777 /app/cache
 
11
  XDG_CACHE_HOME=/app/cache \
12
  PYTHONPATH="${PYTHONPATH}:/app"
13
 
14
+ # 3. Create directories and set global permissions
15
  RUN mkdir -p /app/cache/hub/models--hexgrad--Kokoro-82M && \
16
  mkdir -p /app/cache/hub/.locks/models--hexgrad--Kokoro-82M && \
17
+ mkdir -p /.local && \
18
  chmod -R 777 /app && \
19
+ chmod -R 777 /.local && \
20
+ chmod -R 777 /usr/local/lib/python3.9/site-packages
21
 
22
  WORKDIR /app
23
 
 
30
  # Then install other requirements
31
  RUN pip install --no-cache-dir -r requirements.txt
32
 
33
+ # Install spaCy model
34
+ RUN python -m spacy download en_core_web_sm
35
+
36
  # Pre-download the model with explicit permissions
37
  RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download('hexgrad/Kokoro-82M', 'config.json')" || true && \
38
  chmod -R 777 /app/cache