Update Dockerfile

This commit is contained in:
Robert Dunmire III 2025-01-12 15:23:45 -05:00
parent afdbf9f1cf
commit 0b2d1b251c
1 changed files with 24 additions and 1 deletions

View File

@ -21,6 +21,9 @@ RUN \
python3-venv \
python3-pip \
ca-certificates \
git \
build-essential \
cmake \
pkg-config
WORKDIR /app
@ -42,13 +45,33 @@ RUN \
/app/bin/python3 -m pip install --no-cache-dir --force-reinstall --no-deps \
/tmp/piper_phonemize-${PIPER_PHONEMIZE_VERSION}-py3-none-any.whl &&\
\
ln -s /app/lib/python3.10/site-packages/piper_phonemize /app/share &&\
cp -rfv /app/lib/python3.10/site-packages/piper_phonemize.libs/* /app/lib/ &&\
\
LATEST_PIPER_VERSION=$(wget "https://api.github.com/repos/rhasspy/piper/releases/latest" -O -|awk '/tag_name/{print $4;exit}' FS='[""]') && \
\
wget "https://github.com/rhasspy/piper/releases/download/${LATEST_PIPER_VERSION}/piper_${TARGETARCH}.tar.gz" -O -|tar -zxvf - -C /usr/share &&\
\
/app/bin/python3 -m pip install --no-cache-dir \
"wyoming-piper @ https://github.com/rhasspy/wyoming-piper/archive/refs/tags/v${WYOMING_PIPER_VERSION}.tar.gz"
WORKDIR /work
RUN git clone https://github.com/rhasspy/piper.git .
RUN cmake -Bbuild -DCMAKE_INSTALL_PREFIX=install -DPIPER_PHONEMIZE_DIR=/app
RUN cmake --build build --config Release
RUN cmake --install build
RUN ./build/piper --help
RUN mkdir -p /app/piper && \
mv /work/install/lib*.so* /app/lib/ &&\
cp -rf /work/install/* /app/piper/
RUN \
cd /app/lib/python3.10/site-packages/wyoming_piper/; \
for file in /tmp/wyoming_piper*.diff;do patch -p0 --forward < $file;done;
# cp /build/install/lib*.so* /app/lib/
##########################################
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS dist