From 6011911746a55e44e6f4dcdae26f750a1f26b7d6 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 7 Dec 2023 22:58:41 +0100 Subject: [PATCH] fix(piper): pin petals, phonemize and espeak (#1393) * fix: pin phonemize and espeak Signed-off-by: Ettore Di Giacinto * fix: pin petals deps --------- Signed-off-by: Ettore Di Giacinto --- .github/workflows/test.yml | 2 +- Dockerfile | 8 ++++---- Makefile | 4 ++-- backend/python/petals/petals.yml | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 578e0dd62e2..a347c80fd85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,7 +83,7 @@ jobs: # Pre-build piper before we start tests in order to have shared libraries in place make sources/go-piper && \ GO_TAGS="tts" make -C sources/go-piper piper.o && \ - sudo cp -rfv sources/go-piper/piper/build/pi/lib/. /usr/lib/ && \ + sudo cp -rfv sources/go-piper/piper-phonemize/pi/lib/. /usr/lib/ && \ # Pre-build stable diffusion before we install a newer version of abseil (not compatible with stablediffusion-ncn) GO_TAGS="stablediffusion tts" GRPC_BACKENDS=backend-assets/grpc/stablediffusion make build diff --git a/Dockerfile b/Dockerfile index 35aced64f7f..1c4ec534d87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,9 +105,9 @@ RUN if [ "${BUILD_GRPC}" = "true" ]; then \ # Rebuild with defaults backends RUN make build -RUN if [ ! -d "/build/sources/go-piper/piper/build/pi/lib/" ]; then \ - mkdir -p /build/sources/go-piper/piper/build/pi/lib/ \ - touch /build/sources/go-piper/piper/build/pi/lib/keep \ +RUN if [ ! -d "/build/sources/go-piper/piper-phonemize/pi/lib/" ]; then \ + mkdir -p /build/sources/go-piper/piper-phonemize/pi/lib/ \ + touch /build/sources/go-piper/piper-phonemize/pi/lib/keep \ ; fi ################################### @@ -151,7 +151,7 @@ RUN make prepare-sources && cd /build/grpc/cmake/build && make install && rm -rf COPY --from=builder /build/local-ai ./ # Copy shared libraries for piper -COPY --from=builder /build/sources/go-piper/piper/build/pi/lib/* /usr/lib/ +COPY --from=builder /build/sources/go-piper/piper-phonemize/pi/lib/* /usr/lib/ # do not let stablediffusion rebuild (requires an older version of absl) COPY --from=builder /build/backend-assets/grpc/stablediffusion ./backend-assets/grpc/stablediffusion diff --git a/Makefile b/Makefile index 5dfe5ea2b02..c271300d9ef 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ WHISPER_CPP_VERSION?=3c28d1a5712e4c06b0380166e6f482ca2b525970 BERT_VERSION?=6abe312cded14042f6b7c3cd8edf082713334a4d # go-piper version -PIPER_VERSION?=5a4c9e28c84bac09ab6baa9f88457d852cb46bb2 +PIPER_VERSION?=5386f3ed8e8ff6d9474832aa9a9a6a8d7b337d6a # stablediffusion version STABLEDIFFUSION_VERSION?=902db5f066fd137697e3b69d0fa10d4782bd2c2f @@ -191,7 +191,7 @@ backend-assets/gpt4all: sources/gpt4all/gpt4all-bindings/golang/libgpt4all.a backend-assets/espeak-ng-data: sources/go-piper mkdir -p backend-assets/espeak-ng-data $(MAKE) -C sources/go-piper piper.o - @cp -rf sources/go-piper/piper/build/pi/share/espeak-ng-data/. backend-assets/espeak-ng-data + @cp -rf sources/go-piper/piper-phonemize/pi/share/espeak-ng-data/. backend-assets/espeak-ng-data sources/gpt4all/gpt4all-bindings/golang/libgpt4all.a: sources/gpt4all $(MAKE) -C sources/gpt4all/gpt4all-bindings/golang/ libgpt4all.a diff --git a/backend/python/petals/petals.yml b/backend/python/petals/petals.yml index a68f39b4bde..35eea15ad5d 100644 --- a/backend/python/petals/petals.yml +++ b/backend/python/petals/petals.yml @@ -15,7 +15,7 @@ dependencies: # - ncurses=6.4=h6a678d5_0 # - openssl=3.0.11=h7f8727e_2 # - pip=23.2.1=py311h06a4308_0 - # - python=3.11.5=h955ad1f_0 + - python=3.11.5=h955ad1f_0 # - readline=8.2=h5eee18b_0 # - setuptools=68.0.0=py311h06a4308_0 # - sqlite=3.41.2=h5eee18b_0 @@ -25,5 +25,6 @@ dependencies: # - xz=5.4.2=h5eee18b_0 # - zlib=1.2.13=h5eee18b_0 - pip: + - torch==2.1.0 - git+https://github.com/bigscience-workshop/petals prefix: /opt/conda/envs/petals