File size: 1,155 Bytes
69fb61f 5f7b98a 502a773 5f7b98a 234c57a f39b8e7 70507e2 b19ba5e 70507e2 95e075b b19ba5e 70507e2 b19ba5e 70507e2 95e075b 5806321 95e075b 5f7b98a c8228b3 f39b8e7 234c57a f39b8e7 6edfc0c f39b8e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
FROM debian:11
#Tu token de hf en formato base64
ENV TOKEN=aGZfamlwc3Vsald5UXJRTkhvcWZqRHVweGRMdlNtbEhJbm1OTg==
ENV REPO_ID=HirCoir/piper-laura-neuronal
ENV MODELNAME=es_MX_laura-high
USER root
RUN useradd -m -u 1000 app
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
git espeak-ng
WORKDIR /root
RUN git clone https://github.com/rhasspy/piper
RUN pip install -q cython>=0.29.0 espeak-phonemizer>=1.1.0 librosa>=0.9.2 numpy>=1.19.0 pytorch-lightning~=1.7.0 torch~=1.11.0
RUN pip install -q onnx onnxruntime
RUN pip install -q torchtext==0.12.0
WORKDIR /root/piper/src/python
RUN bash build_monotonic_align.sh
RUN pip install -q torchaudio==0.11.0 torchmetrics==0.11.4
RUN pip install -q huggingface_hub
WORKDIR /root/piper/src/python
COPY *.py .
RUN python3 download-model.py
RUN python3 -m piper_train.export_onnx model.ckpt ${MODELNAME}.onnx
RUN python3 upload-onnx.py
RUN mv ${MODELNAME}.onnx /home/app/${MODELNAME}.onnx
RUN mv ${MODELNAME}.onnx.json /home/app/${MODELNAME}.onnx.json
RUN chmod -R 777 /home/app
RUN pip install flask
USER app
WORKDIR /home/app
COPY server.py .
CMD python3 server.py |