From 9c5cd9b38be3d6ad9db17f287df44f2f284519d4 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 25 Oct 2024 12:25:29 +0200 Subject: [PATCH] fix(parler-tts): pin grpcio-tools (#3960) Seems we require a specific version to build the backend files. Signed-off-by: Ettore Di Giacinto --- backend/python/parler-tts/Makefile | 5 +++-- backend/python/parler-tts/install.sh | 14 +------------- backend/python/parler-tts/protogen.sh | 6 ++++++ backend/python/parler-tts/requirements-after.txt | 3 +-- backend/python/parler-tts/requirements.txt | 1 + 5 files changed, 12 insertions(+), 17 deletions(-) create mode 100755 backend/python/parler-tts/protogen.sh diff --git a/backend/python/parler-tts/Makefile b/backend/python/parler-tts/Makefile index c25b2af7..48da2f3f 100644 --- a/backend/python/parler-tts/Makefile +++ b/backend/python/parler-tts/Makefile @@ -12,9 +12,10 @@ export SKIP_CONDA=1 endif .PHONY: parler-tts -parler-tts: protogen +parler-tts: @echo "Installing $(CONDA_ENV_PATH)..." bash install.sh $(CONDA_ENV_PATH) + $(MAKE) protogen .PHONY: run run: protogen @@ -36,7 +37,7 @@ protogen-clean: $(RM) backend_pb2_grpc.py backend_pb2.py backend_pb2_grpc.py backend_pb2.py: - python3 -m grpc_tools.protoc -I../.. --python_out=. --grpc_python_out=. backend.proto + bash protogen.sh .PHONY: clean clean: protogen-clean diff --git a/backend/python/parler-tts/install.sh b/backend/python/parler-tts/install.sh index 954c6702..fc51d564 100755 --- a/backend/python/parler-tts/install.sh +++ b/backend/python/parler-tts/install.sh @@ -11,16 +11,4 @@ if [ "x${BUILD_PROFILE}" == "xintel" ]; then EXTRA_PIP_INSTALL_FLAGS+=" --upgrade --index-strategy=unsafe-first-match" fi -installRequirements - -# https://github.com/descriptinc/audiotools/issues/101 -# incompatible protobuf versions. -# PYDIR=python3.10 -# pyenv="${MY_DIR}/venv/lib/${PYDIR}/site-packages/google/protobuf/internal/" - -# if [ ! -d ${pyenv} ]; then -# echo "(parler-tts/install.sh): Error: ${pyenv} does not exist" -# exit 1 -# fi - -# curl -L https://raw.githubusercontent.com/protocolbuffers/protobuf/main/python/google/protobuf/internal/builder.py -o ${pyenv}/builder.py +installRequirements \ No newline at end of file diff --git a/backend/python/parler-tts/protogen.sh b/backend/python/parler-tts/protogen.sh new file mode 100755 index 00000000..32f39fbb --- /dev/null +++ b/backend/python/parler-tts/protogen.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +source $(dirname $0)/../common/libbackend.sh + +python3 -m grpc_tools.protoc -I../.. --python_out=. --grpc_python_out=. backend.proto \ No newline at end of file diff --git a/backend/python/parler-tts/requirements-after.txt b/backend/python/parler-tts/requirements-after.txt index df0b8a9e..ca083c40 100644 --- a/backend/python/parler-tts/requirements-after.txt +++ b/backend/python/parler-tts/requirements-after.txt @@ -1,4 +1,3 @@ git+https://github.com/huggingface/parler-tts.git@8e465f1b5fcd223478e07175cb40494d19ffbe17 llvmlite==0.43.0 -numba==0.60.0 -git+https://github.com/descriptinc/audiotools \ No newline at end of file +numba==0.60.0 \ No newline at end of file diff --git a/backend/python/parler-tts/requirements.txt b/backend/python/parler-tts/requirements.txt index ff9adca9..7fbf4cb3 100644 --- a/backend/python/parler-tts/requirements.txt +++ b/backend/python/parler-tts/requirements.txt @@ -1,4 +1,5 @@ grpcio==1.67.0 +grpcio-tools==1.44.0 protobuf certifi llvmlite==0.43.0 \ No newline at end of file