Skip to content

Commit 0bb6526

Browse files
author
Jenny Li
authored
[skip e2e] Add 20.04 (milvus-io#18831)
Signed-off-by: Jenny Li <[email protected]> Signed-off-by: Jenny Li <[email protected]>
1 parent b52e71f commit 0bb6526

File tree

5 files changed

+126
-2
lines changed

5 files changed

+126
-2
lines changed

.github/workflows/publish-builder.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
os: [ubuntu18.04, centos7]
27+
os: [ubuntu18.04, ubuntu20.04, centos7]
2828
env:
2929
OS_NAME: ${{ matrix.os }}
3030
steps:
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
4+
# with the License. You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software distributed under the License
9+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10+
# or implied. See the License for the specific language governing permissions and limitations under the License.
11+
12+
FROM milvusdb/openblas:ubuntu20.04-20220825-4feedf1
13+
14+
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 && \
15+
wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.6-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
16+
apt-get update && apt-get install -y --no-install-recommends \
17+
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev \
18+
libboost-filesystem-dev libboost-serialization-dev python3-dev libboost-python-dev libcurl4-openssl-dev libtbb-dev clang-format-10 clang-tidy-10 lcov libtool m4 autoconf automake && \
19+
apt-get remove --purge -y && \
20+
rm -rf /var/lib/apt/lists/*
21+
22+
RUN apt-get update && apt-get install -y --no-install-recommends libzstd-dev
23+
24+
# Install Go
25+
ENV GOPATH /go
26+
ENV GOROOT /usr/local/go
27+
ENV GO111MODULE on
28+
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
29+
RUN mkdir -p /usr/local/go && wget -qO- "https://golang.org/dl/go1.18.3.linux-amd64.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
30+
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
31+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v1.46.2 && \
32+
# export GO111MODULE=on && go get github.com/quasilyte/go-ruleguard/cmd/[email protected] && \
33+
go install github.com/ramya-rao-a/go-outline@latest && \
34+
go install golang.org/x/tools/gopls@latest && \
35+
go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest && \
36+
go install github.com/go-delve/delve/cmd/dlv@latest && \
37+
go install honnef.co/go/tools/cmd/[email protected] && \
38+
go clean --modcache && \
39+
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
40+
41+
RUN ln -s /go/bin/dlv /go/bin/dlv-dap
42+
43+
RUN apt-get update && apt-get install -y --no-install-recommends \
44+
gdb gdbserver && \
45+
apt-get remove --purge -y && \
46+
rm -rf /var/lib/apt/lists/*
47+
48+
RUN echo 'root:root' | chpasswd
49+
50+
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
51+
RUN mkdir -p /home/milvus/.vscode-server/extensions \
52+
/home/milvus/.vscode-server-insiders/extensions \
53+
&& chmod -R 777 /home/milvus
54+
55+
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
56+
57+
RUN wget -qO- "https://github.com/jeffoverflow/autouseradd/releases/download/1.2.0/autouseradd-1.2.0-amd64.tar.gz" | tar xz -C / --strip-components 1
58+
59+
RUN wget -O /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini && \
60+
chmod +x /tini
61+
62+
ENTRYPOINT [ "/tini", "--", "autouseradd", "--user", "milvus", "--", "/entrypoint.sh" ]
63+
CMD ["tail", "-f", "/dev/null"]

build/docker/milvus/ubuntu18.04/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
1+
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
44
# with the License. You may obtain a copy of the License at
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
4+
# with the License. You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software distributed under the License
9+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10+
# or implied. See the License for the specific language governing permissions and limitations under the License.
11+
12+
FROM milvusdb/openblas:ubuntu20.04-20220825-4feedf1 AS openblas
13+
14+
#FROM alpine
15+
FROM ubuntu:ubuntu:focal-20220426
16+
17+
RUN apt-get update && \
18+
apt-get install -y --no-install-recommends libtbb-dev gfortran netcat iputils-ping ca-certificates && \
19+
apt-get remove --purge -y && \
20+
rm -rf /var/lib/apt/lists/*
21+
22+
COPY --from=openblas /usr/lib/libopenblas-r0.3.9.so /usr/lib/
23+
24+
RUN ln -s /usr/lib/libopenblas-r0.3.9.so /usr/lib/libopenblas.so.0 && \
25+
ln -s /usr/lib/libopenblas.so.0 /usr/lib/libopenblas.so
26+
27+
COPY ./bin/ /milvus/bin/
28+
29+
COPY ./configs/ /milvus/configs/
30+
31+
COPY ./lib/ /milvus/lib/
32+
33+
ENV PATH=/milvus/bin:$PATH
34+
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
35+
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
36+
37+
# Add Tini
38+
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
39+
RUN chmod +x /tini
40+
ENTRYPOINT ["/tini", "--"]
41+
42+
WORKDIR /milvus/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:focal-20220426
2+
3+
# pipefail is enabled for proper error detection in the `wget | apt-key add`
4+
# step
5+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6+
7+
ENV DEBIAN_FRONTEND noninteractive
8+
9+
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates gnupg2 && \
10+
apt-get update && apt-get install -y --no-install-recommends g++ gcc gfortran git make && \
11+
apt-get remove --purge -y && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \
14+
tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \
15+
make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" INTERFACE64=0 NO_STATIC=1 && \
16+
make -j4 PREFIX=/usr NO_STATIC=1 install && \
17+
cd .. && rm -rf OpenBLAS-0.3.9 && rm v0.3.9.tar.gz
18+
19+
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"

0 commit comments

Comments
 (0)