From a00e9a82ae443f61464b5bd3f1ec80b46f1881f2 Mon Sep 17 00:00:00 2001 From: Loric <117862619+LoricOSC@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:43:58 -0600 Subject: [PATCH] Update remaining git clones to git fetch (#2779) Signed-off-by: Loric <117862619+LoricOSC@users.noreply.github.com> --- backend/cpp/grpc/Makefile | 11 ++++++++--- backend/cpp/llama/Makefile | 13 ++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/backend/cpp/grpc/Makefile b/backend/cpp/grpc/Makefile index 5308693b..286fc0bd 100644 --- a/backend/cpp/grpc/Makefile +++ b/backend/cpp/grpc/Makefile @@ -46,9 +46,14 @@ endif $(INSTALLED_PACKAGES): grpc_build $(GRPC_REPO): - git clone --depth $(GIT_CLONE_DEPTH) -b $(TAG_LIB_GRPC) $(GIT_REPO_LIB_GRPC) $(GRPC_REPO)/grpc - cd $(GRPC_REPO)/grpc && git submodule update --jobs 2 --init --recursive --depth $(GIT_CLONE_DEPTH) - + mkdir -p $(GRPC_REPO)/grpc + cd $(GRPC_REPO)/grpc && \ + git init && \ + git remote add origin $(GIT_REPO_LIB_GRPC) && \ + git fetch origin && \ + git checkout $(TAG_LIB_GRPC) && \ + git submodule update --init --recursive --depth 1 + $(GRPC_BUILD): $(GRPC_REPO) mkdir -p $(GRPC_BUILD) cd $(GRPC_BUILD) && cmake $(CMAKE_ARGS) ../$(GRPC_REPO)/grpc && cmake --build . && cmake --build . --target install diff --git a/backend/cpp/llama/Makefile b/backend/cpp/llama/Makefile index 87c07602..f805f4a3 100644 --- a/backend/cpp/llama/Makefile +++ b/backend/cpp/llama/Makefile @@ -1,5 +1,6 @@ LLAMA_VERSION?= +LLAMA_REPO?=https://github.com/ggerganov/llama.cpp CMAKE_ARGS?= BUILD_TYPE?= @@ -45,11 +46,13 @@ ifeq ($(BUILD_TYPE),sycl_f32) endif llama.cpp: - git clone --recurse-submodules https://github.com/ggerganov/llama.cpp llama.cpp - if [ -z "$(LLAMA_VERSION)" ]; then \ - exit 1; \ - fi - cd llama.cpp && git checkout -b build $(LLAMA_VERSION) && git submodule update --init --recursive --depth 1 + mkdir -p llama.cpp + cd llama.cpp && \ + git init && \ + git remote add origin $(LLAMA_REPO) && \ + git fetch origin && \ + git checkout -b build $(LLAMA_VERSION) && \ + git submodule update --init --recursive --depth 1 llama.cpp/examples/grpc-server: llama.cpp mkdir -p llama.cpp/examples/grpc-server