From aac66f66e502dd374e3781340a9248a3e77f0b8e Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 13:10:16 -0400 Subject: [PATCH 1/7] experimental fix: disable abseil tests in release.yaml > Build grpc step Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3aa8736a4944..65edd3448274 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,6 +53,7 @@ jobs: git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \ + -DABSL_BUILD_TESTING=OFF \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target - name: Install gRPC From b24c46b764c1ca306cbab58eab8457d833d9060b Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 13:24:37 -0400 Subject: [PATCH 2/7] move it Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 65edd3448274..9d8fb5ba6983 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,8 +52,7 @@ jobs: run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \ - -DABSL_BUILD_TESTING=OFF \ + cd grpc && mkdir -p cmake/build -DABSL_BUILD_TESTING=OFF && cd cmake/build && cmake -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target - name: Install gRPC From 4b72a9981230ef09460db18c7f873ace87ec21e6 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 13:38:44 -0400 Subject: [PATCH 3/7] just hit them all Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 8 +++++--- .github/workflows/test.yml | 3 ++- Dockerfile | 2 +- backend/cpp/grpc/Makefile | 1 + backend/cpp/llama/Makefile | 3 +++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9d8fb5ba6983..a9e93bface83 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,7 +52,8 @@ jobs: run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build -DABSL_BUILD_TESTING=OFF && cd cmake/build && cmake -DgRPC_INSTALL=ON \ + cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ + -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target - name: Install gRPC @@ -106,7 +107,7 @@ jobs: BACKEND_LIBS="./grpc/cmake/cross_build/third_party/re2/libre2.a ./grpc/cmake/cross_build/libgrpc.a ./grpc/cmake/cross_build/libgrpc++.a ./grpc/cmake/cross_build/third_party/protobuf/libprotobuf.a /usr/aarch64-linux-gnu/lib/libc.so.6 /usr/aarch64-linux-gnu/lib/libstdc++.so.6 /usr/aarch64-linux-gnu/lib/libgomp.so.1 /usr/aarch64-linux-gnu/lib/libm.so.6 /usr/aarch64-linux-gnu/lib/libgcc_s.so.1 /usr/aarch64-linux-gnu/lib/libdl.so.2 /usr/aarch64-linux-gnu/lib/libpthread.so.0 ./ld.so" \ GOOS=linux \ GOARCH=arm64 \ - CMAKE_ARGS="-DProtobuf_INCLUDE_DIRS=$CROSS_STAGING_PREFIX/include -DProtobuf_DIR=$CROSS_STAGING_PREFIX/lib/cmake/protobuf -DgRPC_DIR=$CROSS_STAGING_PREFIX/lib/cmake/grpc -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CROSS_TOOLCHAIN -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++" make dist-cross-linux-arm64 + CMAKE_ARGS="-DABSL_BUILD_TESTING=OFF -DProtobuf_INCLUDE_DIRS=$CROSS_STAGING_PREFIX/include -DProtobuf_DIR=$CROSS_STAGING_PREFIX/lib/cmake/protobuf -DgRPC_DIR=$CROSS_STAGING_PREFIX/lib/cmake/grpc -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CROSS_TOOLCHAIN -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++" make dist-cross-linux-arm64 - uses: actions/upload-artifact@v4 with: name: LocalAI-linux-arm64 @@ -196,7 +197,8 @@ jobs: if: steps.cache-grpc.outputs.cache-hit != 'true' run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \ + cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ + -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target - name: Install gRPC diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7023933cc01..d3167cd06e76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -121,7 +121,8 @@ jobs: if: steps.cache-grpc.outputs.cache-hit != 'true' run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --jobs 5 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \ + cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ + -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 - name: Install gRPC diff --git a/Dockerfile b/Dockerfile index 907ad54b442d..84f89c6cf9cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -227,7 +227,7 @@ RUN apt-get update && \ RUN git clone --recurse-submodules --jobs 4 -b ${GRPC_VERSION} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ mkdir -p /build/grpc/cmake/build && \ cd /build/grpc/cmake/build && \ - cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt/grpc ../.. && \ + cmake -DABSL_BUILD_TESTING=OFF -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt/grpc ../.. && \ make && \ make install && \ rm -rf /build diff --git a/backend/cpp/grpc/Makefile b/backend/cpp/grpc/Makefile index 5308693b33fe..6243bb42cdaa 100644 --- a/backend/cpp/grpc/Makefile +++ b/backend/cpp/grpc/Makefile @@ -12,6 +12,7 @@ GRPC_BUILD=grpc_build export CMAKE_ARGS?= CMAKE_ARGS+=-DCMAKE_BUILD_TYPE=Release +CMAKE_ARGS+=-DABSL_BUILD_TESTING=OFF CMAKE_ARGS+=-DgRPC_INSTALL=ON CMAKE_ARGS+=-DEXECUTABLE_OUTPUT_PATH=../$(INSTALLED_PACKAGES)/grpc/bin CMAKE_ARGS+=-DLIBRARY_OUTPUT_PATH=../$(INSTALLED_PACKAGES)/grpc/lib diff --git a/backend/cpp/llama/Makefile b/backend/cpp/llama/Makefile index 87c07602ff0a..24a7dddbbee2 100644 --- a/backend/cpp/llama/Makefile +++ b/backend/cpp/llama/Makefile @@ -44,6 +44,9 @@ ifeq ($(BUILD_TYPE),sycl_f32) CMAKE_ARGS+=-DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx endif +## Putting this on most CMAKE_ARGS that hit gRPC for testing: +CMAKE_ARGS+=-DABSL_BUILD_TESTING=OFF + llama.cpp: git clone --recurse-submodules https://github.com/ggerganov/llama.cpp llama.cpp if [ -z "$(LLAMA_VERSION)" ]; then \ From 914bc2564e5c85abff9775c984022cd3487b630b Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 16:04:42 -0400 Subject: [PATCH 4/7] desperation time Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a9e93bface83..dcdb42b35294 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,7 +52,8 @@ jobs: run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ + cd grpc && mkdir -p cmake/build && echo "--------------------------" && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ + -DABSL_USE_GOOGLETEST_HEAD=ON \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target From e0b6bdafae8e0d686d2b46a37e34934e2b6350e9 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 16:19:22 -0400 Subject: [PATCH 5/7] desperate measures Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dcdb42b35294..57b79aba747f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,7 +53,7 @@ jobs: git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ cd grpc && mkdir -p cmake/build && echo "--------------------------" && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ - -DABSL_USE_GOOGLETEST_HEAD=ON \ + --DABSL_INTERNAL_MAKE_DLL_TEST=OFF \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target From 5ebf68f94a2ea6e4a32497e34cc415f692a8255d Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 16:23:36 -0400 Subject: [PATCH 6/7] extra dash removed Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 57b79aba747f..a22908b29310 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,7 +53,7 @@ jobs: git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ cd grpc && mkdir -p cmake/build && echo "--------------------------" && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ - --DABSL_INTERNAL_MAKE_DLL_TEST=OFF \ + -DABSL_INTERNAL_MAKE_DLL_TEST=OFF \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target From caeb60c93b2223c521193e29c41aab461eed5a2c Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 10 Jul 2024 16:41:20 -0400 Subject: [PATCH 7/7] minor tweak, major test in new branch Signed-off-by: Dave Lee --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a22908b29310..3d031dfa25c9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,8 +52,9 @@ jobs: run: | git clone --recurse-submodules -b ${{ env.GRPC_VERSION }} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ - cd grpc && mkdir -p cmake/build && echo "--------------------------" && cd cmake/build && cmake -DABSL_BUILD_TESTING=OFF \ - -DABSL_INTERNAL_MAKE_DLL_TEST=OFF \ + cd grpc && mkdir -p cmake/build && echo "--------------------------" && cd cmake/build && cmake \ + -DABSL_BUILD_TESTING=OFF \ + -DABSL_BUILD_TEST_HELPERS=OFF \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. && sudo make --jobs 5 --output-sync=target