Skip to content

Commit 7aa377b

Browse files
authored
fix(arm64): do not build instructions which are not available (#5318)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 64e66dd commit 7aa377b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,13 @@ COPY .git .
301301
RUN make prepare
302302

303303
## Build the binary
304-
RUN make build
304+
## If we're on arm64 AND using cublas/hipblas, skip some of the llama-compat backends to save space
305+
## Otherwise just run the normal build
306+
RUN if [ "${TARGETARCH}" = "arm64" ] && ( [ "${BUILD_TYPE}" = "cublas" ] || [ "${BUILD_TYPE}" = "hipblas" ] ); then \
307+
SKIP_GRPC_BACKEND="backend-assets/grpc/llama-cpp-avx512 backend-assets/grpc/llama-cpp-avx backend-assets/grpc/llama-cpp-avx2" make build; \
308+
else \
309+
make build; \
310+
fi
305311

306312
RUN if [ ! -d "/build/sources/go-piper/piper-phonemize/pi/lib/" ]; then \
307313
mkdir -p /build/sources/go-piper/piper-phonemize/pi/lib/ \

0 commit comments

Comments
 (0)