chore: fix dockerfile libgomp1 dependency + improvements (#852)

This commit is contained in:
Serkan Sahin 2025-10-10 17:17:45 +01:00 committed by GitHub
parent b451728b2f
commit 940a2018e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,16 +1,21 @@
ARG UBUNTU_VERSION=22.04 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 -y --no-install-recommends build-essential git cmake
WORKDIR /sd.cpp WORKDIR /sd.cpp
COPY . . 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 COPY --from=build /sd.cpp/build/bin/sd /sd