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

add Dockerfile.konflux and rpm file for 2.13 #85

Open
wants to merge 1 commit into
base: rhoai-2.13
Choose a base branch
from
Open
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
87 changes: 87 additions & 0 deletions ml_metadata/tools/docker_server/Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM quay.io/konflux-ci/bazel5-ubi8:76a1835 as builder

USER root

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

RUN bazel --version
RUN ls -la ./cachi2/output/deps/generic


COPY . /mlmd-src
RUN mkdir -p /mlmd-src/generic && \
cd ./cachi2/output/deps/generic && \
for file in *; do cp "$file" /mlmd-src/generic/; done

WORKDIR /mlmd-src
RUN ls -la /mlmd-src /mlmd-src/generic

RUN tar --keep-directory-symlink -xzf /mlmd-src/generic/bazel_offline_dist.tar.gz -C ./ --warning=no-timestamp; chown root:root -R ./_bazel_root

# Remove folders and symlinks that are not required - these can be removed from the tar.gz directly
RUN rm -rf ./_bazel_root/13c4dbfe298d1ad9f047b4ec78c9d429/external/ml_metadata

# Arrange deps from offline dist into the cache
RUN export BAZEL_OUTPUT_BASE=$(bazel info output_base); rsync -ar --remove-source-files ./_bazel_root/13c4dbfe298d1ad9f047b4ec78c9d429/ ${BAZEL_OUTPUT_BASE}/
RUN rsync -ar --remove-source-files ./_bazel_root/cache /root/.cache/bazel/_bazel_root/
RUN ls -la /root/.cache/bazel/_bazel_root/ /root/.cache/bazel/_bazel_root/install/


# 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" \
--nofetch --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

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

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}"


LABEL com.redhat.component="odh-mlmd-grpc-server-container" \
name="managed-open-data-hub/odh-mlmd-grpc-server-container-rhel8" \
description="Sidecar container for recording and retrieving metadata associated with ML developer and data scientist workflows" \
summary="odh-mlmd-grpc-server" \
maintainer="['[email protected]']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-mlmd-grpc-server" \
io.openshift.tags="odh-mlmd-grpc-server" \
io.k8s.description="odh-mlmd-grpc-server" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
22 changes: 22 additions & 0 deletions rpms.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
contentOrigin:
repofiles:
- ubi.repo
packages:
- which
- patch
- gcc
- clang
- cmake
- make
- openssl
- ca-certificates
- unzip
- git
- findutils
- python3
- rsync
reinstallPackages:
- name: tzdata
version: 2024b
release: 4.el8
architecture: noarch
Loading
Loading