diff --git a/platform/docker/llama-cpp/Dockerfile b/platform/docker/llama-cpp/Dockerfile index dd8a213..a87a058 100644 --- a/platform/docker/llama-cpp/Dockerfile +++ b/platform/docker/llama-cpp/Dockerfile @@ -8,6 +8,13 @@ ARG CUDA_ARCHITECTURES="86;120" RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates cmake git libcurl4-openssl-dev ninja-build pkg-config && \ rm -rf /var/lib/apt/lists/* +# CUDA's devel image keeps libcuda.so.1 in its compatibility directory, which +# is not part of the default linker search path. llama.cpp's shared CUDA +# backend links successfully without this, but the final server link then +# cannot resolve CUDA driver symbols such as cuMemCreate. Register it for the +# build stage; at runtime the NVIDIA container runtime supplies the host driver. +RUN printf '%s\n' /usr/local/cuda/compat >/etc/ld.so.conf.d/cuda-compat.conf && \ + ldconfig RUN test -n "$LLAMA_CPP_COMMIT" RUN git clone --filter=blob:none https://github.com/ggml-org/llama.cpp /src/llama.cpp && \ git -C /src/llama.cpp checkout "$LLAMA_CPP_COMMIT"