sob111 commited on
Commit
19c3b3d
·
verified ·
1 Parent(s): 0337020

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -36
Dockerfile CHANGED
@@ -1,62 +1,44 @@
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"]
 
1
  FROM python:3.11
2
 
3
+ WORKDIR /home/user/app
4
+ ENV HOME="/home/user"
5
+ #ENV HOME="/tmp"
6
+ ENV HF_HOME="/home/user/.cache/huggingface"
7
+ ENV OMP_NUM_THREADS=1
8
 
9
+ # ⚡ Configuración de Git vía variables de entorno
10
  ENV GIT_AUTHOR_NAME="sob111"
11
  ENV GIT_AUTHOR_EMAIL="[email protected]"
12
  ENV GIT_COMMITTER_NAME="sob111"
13
  ENV GIT_COMMITTER_EMAIL="[email protected]"
14
 
15
+ # Instalar dependencias
16
+ COPY requirements.txt .
17
+ RUN apt-get update && apt-get install -y git wget ffmpeg libsndfile1 unzip build-essential \
 
 
 
 
 
 
 
 
 
18
  && mkdir -p /home/user/.cache/huggingface \
19
  && chmod -R 777 /home/user/.cache \
20
  && pip install --upgrade pip \
21
  && pip install --no-cache-dir -r requirements.txt \
22
  && rm -rf /var/lib/apt/lists/*
23
 
24
+ # Copiar el resto del proyecto
25
+ COPY . .
26
 
27
+ RUN mkdir /home/user/TTS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
 
29
  RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
30
  && cd /home/user/TTS \
31
  && git submodule update --init --recursive \
32
  && pip install --upgrade pip \
33
  && pip install --no-cache-dir -e .
34
 
35
+ RUN mkdir /tmp/output_model
 
 
36
 
37
  RUN pip show TTS
38
+ # RUN which tts_train
39
+ # RUN python -m TTS.bin.train --help
40
+
41
 
42
+ # Comando por defecto
43
+ # CMD ["python", "app.py"]
44
  CMD ["python", "finetune_xtts_hf.py"]