Skip to content

Commit

Permalink
Create Dockerfile.konflux
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadiIram authored Oct 10, 2024
1 parent 01ade8b commit c73649c
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM quay.io/bcook/bazel:ubi8-bazel-5 as builder

USER root

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

COPY . /mlmd-src
WORKDIR /mlmd-src

# Running in offline mode with --nofetch arg, cache and deps must be cloned
# into the local root bazel cache
# "-std=c++17" is needed in order to build with ZetaSQL.
RUN bazel build -c opt --action_env=PATH \
--define=grpc_no_ares=true \
//ml_metadata/metadata_store:metadata_store_server \
--cxxopt="-std=c++17" --host_cxxopt="-std=c++17"

# 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

FROM registry.redhat.io/ubi8/ubi-minimal:latest

COPY --from=builder /mlmd-src/bazel-bin/ml_metadata/metadata_store/metadata_store_server /bin/metadata_store_server
COPY --from=builder /mlmd-src/third_party /mlmd-src/third_party

ENV GRPC_PORT "8080"
ENV METADATA_STORE_SERVER_CONFIG_FILE ""

# Introduces tzdata package here to avoid LoadTimeZone check failed error in the metadata store server.
RUN microdnf update -y && \
microdnf reinstall -y \
tzdata

EXPOSE ${GRPC_PORT}

CMD \
"/bin/metadata_store_server" \
"--grpc_port=${GRPC_PORT}" \
"--metadata_store_server_config_file=${METADATA_STORE_SERVER_CONFIG_FILE}"


ENTRYPOINT \
"/bin/metadata_store_server" \
"--grpc_port=${GRPC_PORT}" \
"--metadata_store_server_config_file=${METADATA_STORE_SERVER_CONFIG_FILE}"

LABEL com.redhat.component="odh-mlmd-grpc-server-container" \
name="managed-open-data-hub/odh-mlmd-grpc-server-container-rhel8" \
version="${CI_CONTAINER_VERSION}" \
git.url="${CI_ML_METADATA_UPSTREAM_URL}" \
git.commit="${CI_ML_METADATA_UPSTREAM_COMMIT}" \
summary="odh-mlmd-grpc-server" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-mlmd-grpc-server" \
io.openshift.tags="odh-mlmd-grpc-server" \
maintainer="['[email protected]']" \
description="Sidecar container for recording and retrieving metadata associated with ML developer and data scientist workflows" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

0 comments on commit c73649c

Please sign in to comment.