Skip to content

Commit

Permalink
fix: try to gen proto with same environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Apr 13, 2024
1 parent 3f3b48b commit 2cf9686
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/python/parler-tts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ protogen: backend_pb2_grpc.py backend_pb2.py
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
backend_pb2_grpc.py backend_pb2.py: parler-tts
bash gen_grpc.sh
11 changes: 11 additions & 0 deletions backend/python/parler-tts/gen_grpc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -ex
## A bash script wrapper that runs the transformers server with conda
## It uses the protoc compiler to generate the gRPC code from the environment, because
## The newer grpc versions are not compatible
#See: https://github.com/mudler/LocalAI/pull/2027

# Activate conda environment
source activate parler

python3 -m grpc_tools.protoc -I../.. --python_out=. --grpc_python_out=. backend.proto

0 comments on commit 2cf9686

Please sign in to comment.