File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ FROM nvidia/cuda:12.6.3-devel-ubuntu22.04 AS env-build
3
3
WORKDIR /srv
4
4
5
5
# install build tools and clone and compile llama.cpp
6
- RUN apt-get update && apt-get install -y build-essential git libgomp1
6
+ RUN apt-get update && apt-get install -y build-essential git libgomp1 cmake
7
7
8
8
RUN git clone https://github.com/ggerganov/llama.cpp.git \
9
9
&& cd llama.cpp \
10
- && make -j LLAMA_CUDA=1 CUDA_DOCKER_ARCH=all
10
+ && cmake -B build -DGGML_CUDA=on -DBUILD_SHARED_LIBS=off \
11
+ && cmake --build build --config Release -j
11
12
12
13
FROM debian:12-slim AS env-deploy
13
14
@@ -19,8 +20,8 @@ COPY --from=0 /usr/local/cuda/lib64/libcublasLt.so.12 ${LD_LIBRARY_PATH}/libcubl
19
20
COPY --from=0 /usr/local/cuda/lib64/libcudart.so.12 ${LD_LIBRARY_PATH}/libcudart.so.12
20
21
21
22
# copy llama.cpp binaries
22
- COPY --from=0 /srv/llama.cpp/llama-cli /usr/local/bin/llama-cli
23
- COPY --from=0 /srv/llama.cpp/llama-server /usr/local/bin/llama-server
23
+ COPY --from=0 /srv/llama.cpp/build/bin/ llama-cli /usr/local/bin/llama-cli
24
+ COPY --from=0 /srv/llama.cpp/build/bin/ llama-server /usr/local/bin/llama-server
24
25
25
26
# create llama user and set home directory
26
27
RUN useradd --system --create-home llama
Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ FROM debian:12-slim AS env-build
3
3
WORKDIR /srv
4
4
5
5
# install build tools and clone and compile llama.cpp
6
- RUN apt-get update && apt-get install -y make git clang-16 libomp-16-dev
6
+ RUN apt-get update && apt-get install -y make git cmake clang-16 libomp-16-dev
7
7
8
8
RUN git clone https://github.com/ggerganov/llama.cpp.git \
9
9
&& cd llama.cpp \
10
- && make -j CC=clang-16 CXX=clang++-16
10
+ && CC=clang-16 CXX=clang++-16 cmake -B build -DBUILD_SHARED_LIBS=off \
11
+ && cmake --build build --config Release -j
11
12
12
13
FROM debian:12-slim AS env-deploy
13
14
@@ -16,8 +17,8 @@ ENV LD_LIBRARY_PATH=/usr/local/lib
16
17
COPY --from=0 /usr/lib/llvm-16/lib/libomp.so.5 ${LD_LIBRARY_PATH}/libomp.so.5
17
18
18
19
# copy llama.cpp binaries
19
- COPY --from=0 /srv/llama.cpp/llama-cli /usr/local/bin/llama-cli
20
- COPY --from=0 /srv/llama.cpp/llama-server /usr/local/bin/llama-server
20
+ COPY --from=0 /srv/llama.cpp/build/bin/ llama-cli /usr/local/bin/llama-cli
21
+ COPY --from=0 /srv/llama.cpp/build/bin/ llama-server /usr/local/bin/llama-server
21
22
22
23
# create llama user and set home directory
23
24
RUN useradd --system --create-home llama
You can’t perform that action at this time.
0 commit comments