From 7aa377b6a99050170f134f9d8f3b5656639aece1 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 5 May 2025 17:30:00 +0200 Subject: [PATCH] fix(arm64): do not build instructions which are not available (#5318) Signed-off-by: Ettore Di Giacinto --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index abbfc7a1..47f4c086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -301,7 +301,13 @@ COPY .git . RUN make prepare ## Build the binary -RUN make build +## If we're on arm64 AND using cublas/hipblas, skip some of the llama-compat backends to save space +## Otherwise just run the normal build +RUN if [ "${TARGETARCH}" = "arm64" ] && ( [ "${BUILD_TYPE}" = "cublas" ] || [ "${BUILD_TYPE}" = "hipblas" ] ); then \ + SKIP_GRPC_BACKEND="backend-assets/grpc/llama-cpp-avx512 backend-assets/grpc/llama-cpp-avx backend-assets/grpc/llama-cpp-avx2" make build; \ + else \ + make build; \ + fi RUN if [ ! -d "/build/sources/go-piper/piper-phonemize/pi/lib/" ]; then \ mkdir -p /build/sources/go-piper/piper-phonemize/pi/lib/ \