From 553f9f5a0711f864a5b52158ba01a86ab8773fdb Mon Sep 17 00:00:00 2001 From: Eric <132873174+eric-epsilla@users.noreply.github.com> Date: Wed, 18 Oct 2023 22:55:19 +0800 Subject: [PATCH] Update Dockerfile add ${TARGETARCH} https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope The following ARG variables are set automatically: TARGETPLATFORM - platform of the build result. Eg linux/amd64, linux/arm/v7, windows/amd64. TARGETOS - OS component of TARGETPLATFORM TARGETARCH - architecture component of TARGETPLATFORM TARGETVARIANT - variant component of TARGETPLATFORM BUILDPLATFORM - platform of the node performing the build. BUILDOS - OS component of BUILDPLATFORM BUILDARCH - architecture component of BUILDPLATFORM BUILDVARIANT - variant component of BUILDPLATFORM --- engine/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/Dockerfile b/engine/Dockerfile index 721648ad..cd9a72ed 100644 --- a/engine/Dockerfile +++ b/engine/Dockerfile @@ -12,9 +12,13 @@ RUN mkdir -p /vectordb/build && cd /vectordb/build && cmake .. && make -j $(npro FROM ubuntu:22.04 +ARG TARGETARCH RUN apt-get update && \ - apt-get install -y --no-install-recommends curl wget net-tools iproute2 supervisor libgomp1 libboost-all-dev s3fs fuse ca-certificates - + apt-get install -y --no-install-recommends curl wget net-tools iproute2 supervisor libgomp1 libboost-all-dev s3fs fuse ca-certificates && \ + wget --no-check-certificate https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-${TARGETARCH} && \ + chmod +x geesefs-linux-${TARGETARCH} && \ + mv geesefs-linux-${TARGETARCH} /usr/local/bin/geesefs && \ + geesefs --version COPY --from=builder /vectordb/build/vectordb /vectordb COPY ./scripts/heartbeat.sh /heartbeat.sh HEALTHCHECK --interval=600s --timeout=30s --retries=1000 CMD bash /heartbeat.sh || exit 0