xtts-castellano / Dockerfile_new
sob111's picture
Create Dockerfile_new
0337020 verified
FROM python:3.11
COPY . .
COPY requirements.txt .
ENV GIT_AUTHOR_NAME="sob111"
ENV GIT_AUTHOR_EMAIL="[email protected]"
ENV GIT_COMMITTER_NAME="sob111"
ENV GIT_COMMITTER_EMAIL="[email protected]"
RUN mkdir /home/user/TTS
RUN mkdir /tmp/output_model
RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
&& cd /home/user/TTS \
&& git submodule update --init --recursive \
&& pip install --upgrade pip \
&& pip install --no-cache-dir -e .
# Instalar dependencias básicas
RUN apt-get update && apt-get install -y \
git wget ffmpeg libsndfile1 unzip build-essential \
&& mkdir -p /home/user/.cache/huggingface \
&& chmod -R 777 /home/user/.cache \
&& pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& rm -rf /var/lib/apt/lists/*
# Configurar Hugging Face cache y variables de entorno
ENV HOME="/home/user"
ENV HF_HOME=/tmp/hf_cache
ENV HF_HOME="/home/user/.cache/huggingface"
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
ENV HF_HUB_CACHE=/tmp/hf_cache
ENV OMP_NUM_THREADS=1
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
ENV NUMBA_DISABLE_CACHING=1
# Crear carpetas necesarias
RUN mkdir -p /home/user/app /tmp/output_model ${HF_HOME}
RUN mkdir -p /home/user/app/xtts_model /home/user/app/output
RUN mkdir -p /home/user/app/xtts_model /home/user/app/output /tmp/huggingface \
&& chmod -R 777 /home/user/app/xtts_model /home/user/app/output /tmp/huggingface
WORKDIR /home/user/app
# Instalar Coqui TTS desde GitHub (incluyendo binarios de entrenamiento)
RUN git clone --branch v0.22.0 https://github.com/coqui-ai/TTS.git /home/user/TTS \
&& cd /home/user/TTS \
&& git submodule update --init --recursive \
&& pip install --upgrade pip \
&& pip install --no-cache-dir -e .
# Copiar requirements adicionales
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip show TTS
CMD ["python", "finetune_xtts_hf.py"]
#CMD ["python", "app.py"]