From 51408b5c1dc370d99f418f3c66009d2a1d200855 Mon Sep 17 00:00:00 2001 From: Serkan <14278530+SergeantSerk@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:15:12 +0100 Subject: [PATCH 1/2] Add libgomp dependency Made improvements to dockerfile readability and image size management --- Dockerfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd9a378f0..6f2fa2f5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,23 @@ ARG UBUNTU_VERSION=22.04 -FROM ubuntu:$UBUNTU_VERSION as build +FROM ubuntu:$UBUNTU_VERSION AS build -RUN apt-get update && apt-get install -y build-essential git cmake +RUN apt-get update && \ + apt-get install --yes --no-install-recommends build-essential git cmake && \ + apt-get clean WORKDIR /sd.cpp COPY . . -RUN mkdir build && cd build && cmake .. && cmake --build . --config Release +RUN cmake . -B ./build +RUN cmake --build ./build --config Release --parallel -FROM ubuntu:$UBUNTU_VERSION as runtime +FROM ubuntu:$UBUNTU_VERSION AS runtime + +RUN apt-get update && \ + apt-get install --yes --no-install-recommends libgomp1 && \ + apt-get clean COPY --from=build /sd.cpp/build/bin/sd /sd From f5bc7b2c471e42f9eb3da59e5abc17109df0d6af Mon Sep 17 00:00:00 2001 From: Serkan <14278530+SergeantSerk@users.noreply.github.com> Date: Tue, 23 Sep 2025 00:12:03 +0100 Subject: [PATCH 2/2] Remove apt-get clean in build We don't submit build stage to the image so no need to waste time cleaning it --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6f2fa2f5f..417335793 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,7 @@ ARG UBUNTU_VERSION=22.04 FROM ubuntu:$UBUNTU_VERSION AS build -RUN apt-get update && \ - apt-get install --yes --no-install-recommends build-essential git cmake && \ - apt-get clean +RUN apt-get update && apt-get install -y --no-install-recommends build-essential git cmake WORKDIR /sd.cpp