mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-05 10:13:01 +00:00
chore(python): update backend sample to consume grpcio from venv (#3961)
Backends can as well depends on grpcio and require different versions from the ones that are installed in the system. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
fd905b483b
commit
dd2e243997
@ -1,8 +1,9 @@
|
|||||||
.DEFAULT_GOAL := install
|
.DEFAULT_GOAL := install
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: protogen
|
install:
|
||||||
bash install.sh
|
bash install.sh
|
||||||
|
$(MAKE) protogen
|
||||||
|
|
||||||
.PHONY: protogen
|
.PHONY: protogen
|
||||||
protogen: backend_pb2_grpc.py backend_pb2.py
|
protogen: backend_pb2_grpc.py backend_pb2.py
|
||||||
@ -12,7 +13,7 @@ protogen-clean:
|
|||||||
$(RM) backend_pb2_grpc.py backend_pb2.py
|
$(RM) backend_pb2_grpc.py backend_pb2.py
|
||||||
|
|
||||||
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
|
.PHONY: clean
|
||||||
clean: protogen-clean
|
clean: protogen-clean
|
||||||
|
6
backend/python/common/template/protogen.sh
Normal file
6
backend/python/common/template/protogen.sh
Normal file
@ -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
|
@ -1,2 +1,3 @@
|
|||||||
grpcio==1.67.0
|
grpcio==1.67.0
|
||||||
protobuf
|
protobuf
|
||||||
|
grpcio-tools
|
Loading…
x
Reference in New Issue
Block a user