-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes the bug 1196 #1232
Fixes the bug 1196 #1232
Conversation
Signed-off-by: Diego <38375572+diego-minguzzi@users.noreply.github.com>
Hi @diego-minguzzi thanks for having a look at this! |
|
||
backend/cpp/llama/grpc-server: | ||
ifdef BUILD_GRPC | ||
backend/cpp/grpc/script/build_grpc.sh ${INSTALLED_PACKAGES} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering - here probably the best approach would be to use cmake directly.
I was reading initially https://github.com/grpc/grpc/tree/master/src/cpp#fetchcontent but leaving this for a follow-up, maybe you'd like to take a look first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that at least the bash-based solution allows people to build without docker, when the PR is approved.
Then, I can try to modify the gRPC installation using the CMake.
Does it sound good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
@lunamidori5 : could you please review the PR #1232 ? Thanks |
@mudler is already checking it out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a first shot at it looks good! Thanks @diego-minguzzi
@mudler is it going to auto merge? |
@mudler , @lunamidori5 : I have found that my PR fails to build because of the following error:
I have found that the Dockerfile uses gRPC 1.58.0, as I do. In the file LocalAI/pkg/grpc/proto/backend_grpc.pb.go there is: Maybe gRPC must be downgraded , e.g. to 1.32? Moreover, I think it is not the content of my PR that causes the build to fail, since the docker files do not use the build option that runs the gRPC build script, it is something else. |
@diego-minguzzi so due to something odd with github, every time I add @mudler for review it adds me too (I do not know why) just act as if I am not here <3 |
In the logs I clearly see the script kicking in:
See the logs here: https://github.com/mudler/LocalAI/actions/runs/6731857467/job/18297419421 - it looks like that |
…guzzi/LocalAI into fix_bug_1196_compilation_fails
Head branch was pushed to by a user without write access
69a575c
@mudler : yes, the BUILD_GRPC was on because the Dockerfile uses the same variable for the same purpose. Should work now, I have no way to use it with Docker. |
…guzzi/LocalAI into fix_bug_1196_compilation_fails
Merged the master and the remote into my branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good here, thanks!
Description
This PR fixes the bug 1196. Previously Llama Cpp failed because it did not find gRPC libraries and the protoc compiler.
Now it is possible to build Local AI along with gRPC using the command:
BUILD_GRPC=ON make build
It was modified the Makefile in the root directory. In case the variable BUILD_GRPC is defined, it runs the script at the path:
backend/cpp/grpc/script/build_grpc.sh
Which clones the gRPC repo and installs it at the path backend/cpp/grpc/installed_packages
The command:
make clean
removes gRPC and the installed files.
The command:
make rebuild
does not affects the installed gRPC.
Makefile was modified at the lines 405-424.
Moreover, under Linux Ubuntu, it gRPC requires the packages:
build-essential autoconf libtool pkg-config