Update Dockerfile

This commit is contained in:
Robert Dunmire III
2025-01-04 11:40:17 -05:00
parent 02357f0e10
commit 5ac33d576a
+28 -26
View File
@@ -1,6 +1,5 @@
FROM nvidia/cuda:11.7.1-base-ubuntu22.04
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
# Install Piper
WORKDIR /usr/src
ARG TARGETARCH=amd64
@@ -9,43 +8,46 @@ ARG WYOMING_PIPER_VERSION='1.5.0'
ARG PIPER_RELEASE='1.2.0'
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
apt-get update &&\
apt-get install -y --no-install-recommends \
wget \
curl \
python3 \
python3-pip
RUN \
pip3 install --no-cache-dir -U \
setuptools \
wheel \
\
&& pip3 install --no-cache-dir torch \
\
&& wget https://github.com/rhasspy/piper-phonemize/releases/download/v1.1.0/piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl \
\
&& mv piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl piper_phonemize-1.1.0-py3-none-any.whl \
\
&& pip3 install --no-cache-dir --force-reinstall --no-deps \
pip3 install --no-cache-dir \
torch
RUN \
pip3 install --no-cache-dir --force-reinstall --no-deps\
"piper-tts==${PIPER_RELEASE}" \
&&\
\
&& pip3 install --no-cache-dir --force-reinstall --no-deps \
piper_phonemize-1.1.0-py3-none-any.whl \
\
&& pip3 install --no-cache-dir \
pip3 install --no-cache-dir\
onnxruntime-gpu \
"wyoming-piper @ https://github.com/rhasspy/wyoming-piper/archive/refs/tags/v${WYOMING_PIPER_VERSION}.tar.gz" \
&&\
\
&& rm -r piper_phonemize-1.1.0-py3-none-any.whl \
&& curl -L -s \
"https://github.com/rhasspy/piper/releases/download/v${PIPER_RELEASE}/piper_${TARGETARCH}${TARGETVARIANT}.tar.gz"|tar -zxvf - -C /usr/share
pip3 install --no-cache-dir\
"wyoming-piper==${WYOMING_PIPER_VERSION}"\
&&\
\
wget \
"https://github.com/rhasspy/piper/releases/download/v${PIPER_RELEASE}/piper_${TARGETARCH}${TARGETVARIANT}.tar.gz" -O -|tar -zxvf - -C /usr/share
# pip3 install --no-cache-dir --force-reinstall --no-deps\
# piper_phonemize-1.1.0-py3-none-any.whl &&\
# \
# "wyoming-piper @ https://github.com/rhasspy/wyoming-piper/archive/refs/tags/v${WYOMING_PIPER_VERSION}.tar.gz"
# wget https://github.com/rhasspy/piper-phonemize/releases/download/v1.1.0/piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl &&\
# mv piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl piper_phonemize-1.1.0-py3-none-any.whl &&\
# rm -r piper_phonemize-1.1.0-py3-none-any.whl &&\
# Clean up
RUN \
rm -rf /var/lib/apt/lists/* \
&& rm /*.deb \
&& mkdir -p /share/piper
rm -rf /var/lib/apt/lists/* &&\
rm /*.deb &&\
mkdir -p /share/piper
# Patch to enable CUDA arguments for piper
COPY patch/process.py /usr/local/lib/python3.10/dist-packages/wyoming_piper/