Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update base image and add more information into docker image #74

Merged
merged 21 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build Vectordb
on:
push:
branches: [ "dev" ]
paths: ['engine/Dockerfile']
paths: ['engine/Dockerfile', 'engine/Dockerfile.base']

jobs:
build:
Expand Down Expand Up @@ -43,6 +43,12 @@ jobs:


cd ./engine

docker buildx build --platform linux/amd64,linux/arm64 \
--push \
-f Dockerfile.base \
-t epsilla/base:latest .

docker buildx build --build-arg="RELEASE_VERSION=${IMAGE_TAG}" \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \
Expand All @@ -52,12 +58,15 @@ jobs:
--label "org.opencontainers.image.url"="https://www.epsilla.com" \
--label "org.opencontainers.image.vendor"="Epsilla" \
--label "org.opencontainers.image.version"=${IMAGE_TAG} \
--pull \
--push \
-t epsilla/vectordb:dev .









Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ jobs:
cd ./engine
echo "\n\nBuild docker image for amd64 firstly\n\n"

docker build --pull -t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG}-amd64 .
docker build --pull --build-arg="RELEASE_VERSION=${IMAGE_TAG}" \
--label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \
--label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \
--label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \
--label "org.opencontainers.image.title"="Epsilla Vector Database" \
--label "org.opencontainers.image.url"="https://www.epsilla.com" \
--label "org.opencontainers.image.vendor"="Epsilla" \
--label "org.opencontainers.image.version"=${IMAGE_TAG} \
-t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG}-amd64 .

docker push ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG}-amd64


Expand Down
25 changes: 6 additions & 19 deletions engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
FROM ubuntu:22.04 as builder

RUN apt-get update && \
apt-get install -y python3 python3-pip git cmake build-essential libboost-all-dev sudo
FROM epsilla/base as builder
ADD ./ /vectordb

WORKDIR /vectordb
ENV OATPP_INSTALL_PATH=/vectordb/build/dependencies
RUN scripts/install_oatpp_modules.sh
RUN mkdir -p /vectordb/build && cd /vectordb/build && cmake .. && make -j $(nproc) && chmod +x vectordb

RUN mkdir -p /vectordb/build && cd /vectordb/build && cmake .. && make && chmod +x vectordb


FROM ubuntu:22.04
FROM epsilla/base
ARG TARGETARCH
ARG RELEASE_VERSION=latest
ENV ENV_RELEASE_VERSION=$RELEASE_VERSION

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 && \
echo "====== Install geesefs ======" && \
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 && \
apt-get clean all && \
rm -rf /var/apt/lists/* /var/cache/apt/*
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

RUN apt-get purge -y --auto-remove wget python3 python3-pip libpython3-dev git cmake build-essential && \
apt-get clean all && \
rm -rf /var/apt/lists/* /var/cache/apt/*
ENTRYPOINT ["/vectordb"]

7 changes: 7 additions & 0 deletions engine/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:23.10

RUN apt-get update && \
apt-get install -y --no-install-recommends python3 python3-pip libpython3-dev git curl wget iproute2 supervisor cmake build-essential libgomp1 libboost-all-dev s3fs fuse ca-certificates && \
apt-get clean all && \
rm -rf /var/apt/lists/* /var/cache/apt/*

Loading