sob111 commited on
Commit
49e40f5
·
verified ·
1 Parent(s): aab7ded

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -18
Dockerfile CHANGED
@@ -1,44 +1,46 @@
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"]
 
 
1
  FROM python:3.11
2
 
3
+ # Definir HOME y rutas de caché para Hugging Face
4
  WORKDIR /home/user/app
5
  ENV HOME="/home/user"
 
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 (sin .gitconfig)
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 del sistema
16
+ RUN apt-get update && apt-get install -y \
17
+ git wget ffmpeg libsndfile1 unzip build-essential \
 
 
 
 
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Instalar dependencias Python
21
+ COPY requirements.txt .
22
+ RUN pip install --upgrade pip \
23
+ && pip install --no-cache-dir -r requirements.txt
24
 
25
+ # Instalar Coqui TTS en editable mode desde v0.22.0
26
  RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
27
  && cd /home/user/TTS \
28
  && git submodule update --init --recursive \
 
29
  && pip install --no-cache-dir -e .
30
 
31
+ # Crear directorio de salida para checkpoints
32
+ RUN mkdir -p /tmp/output_model
33
 
34
+ # Copiar el proyecto
35
+ COPY . .
36
+
37
+ # Verificar instalación
38
  RUN pip show TTS
 
 
39
 
40
+ # Entrenamiento: usa "python -m TTS.bin.train" en lugar de tts_train
41
+ # RUN python -m TTS.bin.train --help
42
 
43
+ # Comando por defecto (se puede sobreescribir en Space)
44
  CMD ["python", "app.py"]
45
  # CMD ["python", "finetune_xtts_hf.py"]
46
+