From 92bb442ad999a0d52df0af2730cd861012e8ac5c Mon Sep 17 00:00:00 2001 From: Mike Abbott Date: Wed, 12 Nov 2025 12:33:55 -0700 Subject: [PATCH] docker : preserve .so symlinks for docker container builds (#17214) --- .devops/cann.Dockerfile | 2 +- .devops/cpu.Dockerfile | 2 +- .devops/cuda.Dockerfile | 2 +- .devops/intel.Dockerfile | 2 +- .devops/musa.Dockerfile | 2 +- .devops/rocm.Dockerfile | 2 +- .devops/vulkan.Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.devops/cann.Dockerfile b/.devops/cann.Dockerfile index 02f3e03b5e..9d9fabf887 100644 --- a/.devops/cann.Dockerfile +++ b/.devops/cann.Dockerfile @@ -49,7 +49,7 @@ RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh --force \ # -- Organize build artifacts for copying in later stages -- # Create a lib directory to store all .so files RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; # Create a full directory to store all executables and Python scripts RUN mkdir -p /app/full && \ diff --git a/.devops/cpu.Dockerfile b/.devops/cpu.Dockerfile index e1bb7d4675..6e16ecda44 100644 --- a/.devops/cpu.Dockerfile +++ b/.devops/cpu.Dockerfile @@ -20,7 +20,7 @@ RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "arm64" ]; then \ cmake --build build -j $(nproc) RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile index 4b708ae278..54f793d0a3 100644 --- a/.devops/cuda.Dockerfile +++ b/.devops/cuda.Dockerfile @@ -25,7 +25,7 @@ RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ cmake --build build --config Release -j$(nproc) RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile index cd2f9aa79b..d1a8fbed4c 100644 --- a/.devops/intel.Dockerfile +++ b/.devops/intel.Dockerfile @@ -21,7 +21,7 @@ RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \ cmake --build build --config Release -j$(nproc) RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfile index ec44b22914..faa3500e61 100644 --- a/.devops/musa.Dockerfile +++ b/.devops/musa.Dockerfile @@ -32,7 +32,7 @@ RUN if [ "${MUSA_DOCKER_ARCH}" != "default" ]; then \ cmake --build build --config Release -j$(nproc) RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ diff --git a/.devops/rocm.Dockerfile b/.devops/rocm.Dockerfile index df9058d946..d6bf28b105 100644 --- a/.devops/rocm.Dockerfile +++ b/.devops/rocm.Dockerfile @@ -45,7 +45,7 @@ RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \ && cmake --build build --config Release -j$(nproc) RUN mkdir -p /app/lib \ - && find build -name "*.so" -exec cp {} /app/lib \; + && find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ diff --git a/.devops/vulkan.Dockerfile b/.devops/vulkan.Dockerfile index 7592468403..b6b802a7c6 100644 --- a/.devops/vulkan.Dockerfile +++ b/.devops/vulkan.Dockerfile @@ -20,7 +20,7 @@ RUN cmake -B build -DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DLLAMA_BUILD_TESTS=OFF -D cmake --build build --config Release -j$(nproc) RUN mkdir -p /app/lib && \ - find build -name "*.so" -exec cp {} /app/lib \; + find build -name "*.so*" -exec cp -P {} /app/lib \; RUN mkdir -p /app/full \ && cp build/bin/* /app/full \