Fix CUDA driver linking in llama.cpp image
This commit is contained in:
@@ -8,6 +8,13 @@ ARG CUDA_ARCHITECTURES="86;120"
|
|||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates cmake git libcurl4-openssl-dev ninja-build pkg-config && \
|
ca-certificates cmake git libcurl4-openssl-dev ninja-build pkg-config && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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 test -n "$LLAMA_CPP_COMMIT"
|
||||||
RUN git clone --filter=blob:none https://github.com/ggml-org/llama.cpp /src/llama.cpp && \
|
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"
|
git -C /src/llama.cpp checkout "$LLAMA_CPP_COMMIT"
|
||||||
|
|||||||
Reference in New Issue
Block a user