sob111 commited on
Commit
0337020
·
verified ·
1 Parent(s): 4cbf7f0

Create Dockerfile_new

Browse files
Files changed (1) hide show
  1. Dockerfile_new +62 -0
Dockerfile_new ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ COPY . .
4
+
5
+ COPY requirements.txt .
6
+
7
+ ENV GIT_AUTHOR_NAME="sob111"
8
+ ENV GIT_AUTHOR_EMAIL="[email protected]"
9
+ ENV GIT_COMMITTER_NAME="sob111"
10
+ ENV GIT_COMMITTER_EMAIL="[email protected]"
11
+
12
+ RUN mkdir /home/user/TTS
13
+ RUN mkdir /tmp/output_model
14
+
15
+ RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
16
+ && cd /home/user/TTS \
17
+ && git submodule update --init --recursive \
18
+ && pip install --upgrade pip \
19
+ && pip install --no-cache-dir -e .
20
+
21
+ # Instalar dependencias básicas
22
+ RUN apt-get update && apt-get install -y \
23
+ git wget ffmpeg libsndfile1 unzip build-essential \
24
+ && mkdir -p /home/user/.cache/huggingface \
25
+ && chmod -R 777 /home/user/.cache \
26
+ && pip install --upgrade pip \
27
+ && pip install --no-cache-dir -r requirements.txt \
28
+ && rm -rf /var/lib/apt/lists/*
29
+
30
+ # Configurar Hugging Face cache y variables de entorno
31
+
32
+ ENV HOME="/home/user"
33
+ ENV HF_HOME=/tmp/hf_cache
34
+ ENV HF_HOME="/home/user/.cache/huggingface"
35
+ ENV TRANSFORMERS_CACHE=/tmp/hf_cache
36
+ ENV HF_HUB_CACHE=/tmp/hf_cache
37
+ ENV OMP_NUM_THREADS=1
38
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache
39
+ ENV NUMBA_DISABLE_CACHING=1
40
+
41
+ # Crear carpetas necesarias
42
+ RUN mkdir -p /home/user/app /tmp/output_model ${HF_HOME}
43
+ RUN mkdir -p /home/user/app/xtts_model /home/user/app/output
44
+ RUN mkdir -p /home/user/app/xtts_model /home/user/app/output /tmp/huggingface \
45
+ && chmod -R 777 /home/user/app/xtts_model /home/user/app/output /tmp/huggingface
46
+ WORKDIR /home/user/app
47
+
48
+ # Instalar Coqui TTS desde GitHub (incluyendo binarios de entrenamiento)
49
+ RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
50
+ && cd /home/user/TTS \
51
+ && git submodule update --init --recursive \
52
+ && pip install --upgrade pip \
53
+ && pip install --no-cache-dir -e .
54
+
55
+ # Copiar requirements adicionales
56
+ COPY requirements.txt .
57
+ RUN pip install --no-cache-dir -r requirements.txt
58
+
59
+ RUN pip show TTS
60
+
61
+ CMD ["python", "finetune_xtts_hf.py"]
62
+ #CMD ["python", "app.py"]