Skip to content

Commit

Permalink
pin llama.cpp build version with docker for both platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Jan 27, 2025
1 parent 237bdfb commit 665526d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions images/benchmark-llm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM ghcr.io/ggerganov/llama.cpp:full AS base_cpu
# when updating the build number, make sure both AMD64 and ARM64 builds are available
ARG LLAMA_CPP_BUILD=b4524
FROM ghcr.io/ggerganov/llama.cpp:full-${LLAMA_CPP_BUILD} AS base_cpu
# collect and copy shared libs for CPU-optimized benchmarks on AMD64,
# where the default build is CUDA
COPY extract-shared-cpu-libs.sh /tmp/extract-shared-cpu-libs.sh
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; then /tmp/extract-shared-cpu-libs.sh; fi
RUN mv /app /llama_cpp_cpu

FROM ghcr.io/ggerganov/llama.cpp:full-cuda AS base_amd64
FROM ghcr.io/ggerganov/llama.cpp:full-cuda-${LLAMA_CPP_BUILD} AS base_amd64
RUN mv /app /llama_cpp_gpu

FROM ghcr.io/ggerganov/llama.cpp:full AS base_arm64
FROM ghcr.io/ggerganov/llama.cpp:full-${LLAMA_CPP_BUILD} AS base_arm64

ARG TARGETARCH
FROM base_${TARGETARCH} AS final
Expand Down

0 comments on commit 665526d

Please sign in to comment.