Skip to content
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
4 changes: 3 additions & 1 deletion .tekton/odh-mlmd-grpc-server-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ spec:
value: true
- name: build-platforms
value:
- linux/x86_64
- linux-mxlarge/amd64
- linux-mxlarge/arm64
- linux/ppc64le
- name: image-expires-after
value: 5d
taskRunSpecs:
Expand Down
53 changes: 25 additions & 28 deletions ml_metadata/tools/docker_server/Dockerfile.konflux
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,38 @@ FROM registry.access.redhat.com/ubi9/ubi:latest@sha256:8851294389a8641bd6efcd60f

USER root

RUN dnf install -y -q \
which \
patch \
gcc \
clang \
cmake \
make \
openssl \
ca-certificates \
unzip \
git \
findutils \
python3

# Set up Bazel 5.3.0
ENV BAZEL_VERSION 5.3.0
WORKDIR /
RUN mkdir /bazel && \
cd /bazel && \
curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -o /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE && \
chmod +x bazel-*.sh && \
./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
cd / && \
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
RUN curl -o /etc/yum.repos.d/copr-galileo-bazel.repo \
https://copr.fedorainfracloud.org/coprs/galileo/bazel/repo/epel-9/galileo-bazel-epel-9.repo && \
dnf install -y \
which \
patch \
gcc \
clang \
cmake \
make \
openssl-devel \
libcurl-devel \
ca-certificates \
unzip \
git \
findutils \
python3 \
bazel5

COPY . /mlmd-src
WORKDIR /mlmd-src

ENV BAZEL_JOBS=8

# "-std=c++17" is needed in order to build with ZetaSQL.
RUN bazel build -c opt --action_env=PATH \
--define=grpc_no_ares=true \
--copt="-Wno-maybe-uninitialized" \
--jobs=${BAZEL_JOBS} \
//ml_metadata/metadata_store:metadata_store_server \
--cxxopt="-std=c++17" --host_cxxopt="-std=c++17" \
--verbose_failures


# copying libmysqlclient source onto THIRD_PARTY folder.
RUN mkdir -p /mlmd-src/third_party
RUN cp -RL /mlmd-src/bazel-mlmd-src/external/libmysqlclient /mlmd-src/third_party/mariadb-connector-c
Expand All @@ -53,8 +48,10 @@ ENV METADATA_STORE_SERVER_CONFIG_FILE ""

# Introduces tzdata package here to avoid LoadTimeZone check failed error in the metadata store server.
# https://access.redhat.com/solutions/5616681
RUN microdnf update tzdata -y && \
microdnf reinstall tzdata -y
RUN microdnf reinstall tzdata -y && \
microdnf clean all

USER 65534:65534

ENTRYPOINT \
"/bin/metadata_store_server" \
Expand Down