From 9cc7edfb3993c11a0d92899e820ae02bb70d57f5 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sun, 10 May 2026 00:44:56 -0400 Subject: [PATCH] fix: set CMAKE_INSTALL_PREFIX=/build/dist at configure time for CPU, match preset for HIP --- ai/ollama/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ai/ollama/Dockerfile b/ai/ollama/Dockerfile index 2681c46..f41ab5d 100644 --- a/ai/ollama/Dockerfile +++ b/ai/ollama/Dockerfile @@ -48,9 +48,12 @@ ENV LDFLAGS=-s RUN mkdir -p build-cpu && \ PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ cmake -B build-cpu -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_HIP_COMPILER="" && \ + -DCMAKE_HIP_COMPILER="" \ + -DCMAKE_INSTALL_PREFIX=/build/dist && \ cmake --build build-cpu --target ggml-cpu -- -l $(nproc) && \ - cmake --install build-cpu --component CPU --strip --prefix /build/dist + cmake --install build-cpu --component CPU --strip && \ + echo "=== CPU install ===" && \ + (find /build/dist/lib/ollama -type f -o -type l 2>&1 | head -20 || echo "empty") # Step 2: Build HIP backend with ROCm preset + gfx906 target only # The ROCm 6 preset enables HIP language detection (enable_language(HIP)) @@ -65,7 +68,7 @@ RUN mkdir -p build-hip && \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH="/opt/rocm" && \ cmake --build build-hip --target ggml-hip -- -l $(nproc) && \ - cmake --install build-hip --component HIP --strip --prefix /build/dist && \ + cmake --install build-hip --component HIP --strip && \ echo "=== HIP install ===" && \ find /build/dist/lib/ollama -type f -o -type l | head -20