From: slaren Date: Thu, 6 Jun 2024 05:19:49 +0000 (+0200) Subject: docker : build only main and server in their images (#7782) X-Git-Tag: upstream/0.0.4488~1392 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2d08b7fbb483c14bd2b173d4cd51ea3a4f862e8f;p=pkg%2Fggml%2Fsources%2Fllama.cpp docker : build only main and server in their images (#7782) * add openmp lib to dockerfiles * build only main and server in their docker images --- diff --git a/.devops/main-cuda.Dockerfile b/.devops/main-cuda.Dockerfile index 5bcd45fe..2aec4a85 100644 --- a/.devops/main-cuda.Dockerfile +++ b/.devops/main-cuda.Dockerfile @@ -23,7 +23,7 @@ ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH} # Enable CUDA ENV LLAMA_CUDA=1 -RUN make -j$(nproc) +RUN make -j$(nproc) main FROM ${BASE_CUDA_RUN_CONTAINER} as runtime diff --git a/.devops/main-rocm.Dockerfile b/.devops/main-rocm.Dockerfile index 37576d68..dcaeb3e7 100644 --- a/.devops/main-rocm.Dockerfile +++ b/.devops/main-rocm.Dockerfile @@ -40,6 +40,6 @@ ENV LLAMA_HIPBLAS=1 ENV CC=/opt/rocm/llvm/bin/clang ENV CXX=/opt/rocm/llvm/bin/clang++ -RUN make -j$(nproc) +RUN make -j$(nproc) main ENTRYPOINT [ "/app/main" ] diff --git a/.devops/main.Dockerfile b/.devops/main.Dockerfile index 98a58a4b..d2514c4b 100644 --- a/.devops/main.Dockerfile +++ b/.devops/main.Dockerfile @@ -9,7 +9,7 @@ WORKDIR /app COPY . . -RUN make -j$(nproc) +RUN make -j$(nproc) main FROM ubuntu:$UBUNTU_VERSION as runtime diff --git a/.devops/server-cuda.Dockerfile b/.devops/server-cuda.Dockerfile index 2532e69e..4e9747b8 100644 --- a/.devops/server-cuda.Dockerfile +++ b/.devops/server-cuda.Dockerfile @@ -25,7 +25,7 @@ ENV LLAMA_CUDA=1 # Enable cURL ENV LLAMA_CURL=1 -RUN make -j$(nproc) +RUN make -j$(nproc) server FROM ${BASE_CUDA_RUN_CONTAINER} as runtime diff --git a/.devops/server.Dockerfile b/.devops/server.Dockerfile index a41c16b6..bee63b96 100644 --- a/.devops/server.Dockerfile +++ b/.devops/server.Dockerfile @@ -11,7 +11,7 @@ COPY . . ENV LLAMA_CURL=1 -RUN make -j$(nproc) +RUN make -j$(nproc) server FROM ubuntu:$UBUNTU_VERSION as runtime