Shroukkkk commited on
Commit
bdb9444
·
verified ·
1 Parent(s): 923d166

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -4,6 +4,13 @@ ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PIP_NO_CACHE_DIR=1
5
  ENV PYTHONUNBUFFERED=1
6
 
 
 
 
 
 
 
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  git \
9
  ffmpeg \
@@ -15,9 +22,9 @@ WORKDIR /app
15
  COPY requirements.txt /app/requirements.txt
16
  RUN pip install -r /app/requirements.txt
17
 
18
- # Create Coqui config dir and pre-accept CPML non-interactively
19
- RUN mkdir -p /root/.local/share/tts && \
20
- echo "y" > /root/.local/share/tts/.tos_agreed
21
 
22
  COPY app.py /app/app.py
23
 
 
4
  ENV PIP_NO_CACHE_DIR=1
5
  ENV PYTHONUNBUFFERED=1
6
 
7
+ # Force all HF + Coqui caches into /data (writable in Spaces)
8
+ ENV HF_HOME=/data/huggingface
9
+ ENV TRANSFORMERS_CACHE=/data/huggingface/transformers
10
+ ENV HF_HUB_CACHE=/data/huggingface/hub
11
+ ENV XDG_CACHE_HOME=/data/cache
12
+ ENV XDG_DATA_HOME=/data/local/share
13
+
14
  RUN apt-get update && apt-get install -y --no-install-recommends \
15
  git \
16
  ffmpeg \
 
22
  COPY requirements.txt /app/requirements.txt
23
  RUN pip install -r /app/requirements.txt
24
 
25
+ # Pre-accept Coqui CPML in the exact XDG_DATA_HOME location Coqui uses
26
+ RUN mkdir -p /data/local/share/tts && \
27
+ echo "y" > /data/local/share/tts/.tos_agreed
28
 
29
  COPY app.py /app/app.py
30