Skip to content

Commit

Permalink
fix(parler-tts): pin grpcio-tools (#3960)
Browse files Browse the repository at this point in the history
Seems we require a specific version to build the backend files.

Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler authored Oct 25, 2024
1 parent 07ce0a3 commit 9c5cd9b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
5 changes: 3 additions & 2 deletions backend/python/parler-tts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 1 addition & 13 deletions backend/python/parler-tts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions backend/python/parler-tts/protogen.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions backend/python/parler-tts/requirements-after.txt
Original file line number Diff line number Diff line change
@@ -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
numba==0.60.0
1 change: 1 addition & 0 deletions backend/python/parler-tts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
grpcio==1.67.0
grpcio-tools==1.44.0
protobuf
certifi
llvmlite==0.43.0

0 comments on commit 9c5cd9b

Please sign in to comment.