don0726 commited on
Commit
dfd3638
·
verified ·
1 Parent(s): a8b9bca

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -6
Dockerfile CHANGED
@@ -1,16 +1,23 @@
1
  FROM python:3.10-slim
2
 
3
- RUN apt update && apt install -y git ffmpeg wget
 
 
4
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
- WORKDIR /app
 
 
 
 
 
9
 
10
- RUN mkdir -p /models/xtts \
11
- && wget -O /models/xtts/model.pth https://huggingface.co/coqui/XTTS-v2/resolve/main/model.pth \
12
- && wget -O /models/xtts/config.json https://huggingface.co/coqui/XTTS-v2/resolve/main/config.json
13
 
14
  COPY app.py .
15
 
16
- CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ RUN apt update && apt install -y git ffmpeg wget && rm -rf /var/lib/apt/lists/*
4
+
5
+ WORKDIR /app
6
 
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # Pre-download XTTS model
11
+ RUN mkdir -p /models/xtts && \
12
+ wget -O /models/xtts/model.pth https://huggingface.co/coqui/XTTS-v2/resolve/main/model.pth && \
13
+ wget -O /models/xtts/config.json https://huggingface.co/coqui/XTTS-v2/resolve/main/config.json && \
14
+ wget -O /models/xtts/vocab.json https://huggingface.co/coqui/XTTS-v2/resolve/main/vocab.json && \
15
+ wget -O /models/xtts/speakers_xtts.pth https://huggingface.co/coqui/XTTS-v2/resolve/main/speakers_xtts.pth
16
 
17
+ ENV COQUI_TOS_AGREED=1
18
+ ENV GRADIO_SERVER_NAME=0.0.0.0
19
+ ENV GRADIO_SERVER_PORT=7860
20
 
21
  COPY app.py .
22
 
23
+ CMD ["python", "app.py"]