|
|
|
FROM python:3.10.12-slim |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
build-essential \ |
|
autoconf \ |
|
automake \ |
|
libtool \ |
|
pkg-config \ |
|
git \ |
|
cmake \ |
|
ffmpeg \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN git clone -b dev-ca https://github.com/projecte-aina/espeak-ng |
|
|
|
RUN pip install --upgrade pip && \ |
|
cd espeak-ng && \ |
|
./autogen.sh && \ |
|
./configure --prefix=/usr && \ |
|
make && \ |
|
make install |
|
|
|
RUN mkdir -p cache && chmod 777 cache |
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
USER user |
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user requirements.txt $HOME/app/ |
|
|
|
RUN pip install -r requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN huggingface-cli download projecte-aina/matxa-tts-cat-multiaccent matcha_multispeaker_cat_all_opset_15_10_steps.onnx --local-dir $HOME/app/ |
|
RUN huggingface-cli download projecte-aina/matxa-tts-cat-multiaccent config.yaml--local-dir $HOME/app/ |
|
|
|
RUN huggingface-cli download projecte-aina/alvocat-vocos-22khz mel_spec_22khz_cat.onnx --local-dir $HOME/app/ |
|
RUN huggingface-cli download projecte-aina/alvocat-vocos-22khz config.yaml --local-dir $HOME/app/ |
|
|
|
COPY --chown=user . $HOME/app/ |
|
|
|
|
|
USER root |
|
RUN chown -R user:user $HOME/app |
|
USER user |
|
|
|
EXPOSE 7860 |
|
|
|
CMD ["python3", "-u", "infer_onnx.py"] |
|
|
|
|
|
|