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: 2 additions & 2 deletions ml_metadata/third_party/postgresql.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 7847e8a..17714af 100644
*/
#include "c.h"

+#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
+#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) && !defined(__aarch64__) && !defined(__AARCH64__) && !defined(__arm64__) && !defined(__ARM64__)
#ifdef HAVE__GET_CPUID
#include <cpuid.h>
#endif
Expand All @@ -21,7 +21,7 @@ index 7847e8a..17714af 100644
static bool
pg_popcount_available(void)
{
+#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
+#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) && !defined(__aarch64__) && !defined(__AARCH64__) && !defined(__arm64__) && !defined(__ARM64__)
unsigned int exx[4] = {0, 0, 0, 0};

#if defined(HAVE__GET_CPUID)
Expand Down
50 changes: 20 additions & 30 deletions ml_metadata/tools/docker_server/Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,23 @@ FROM registry.access.redhat.com/ubi9/ubi:latest 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

# 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
Expand All @@ -41,7 +32,7 @@ RUN \
sed -i "s/$PREVIOUS_ZETASQL_COMMIT/$CURRENT_ZETASQL_COMMIT/g" WORKSPACE && \
sed -i "s/$PREVIOUS_ZETASQL_SHA/$CURRENT_ZETASQL_SHA/g" WORKSPACE

# Running in offline mode with --nofetch arg, cache and deps must be cloned
# 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 \
Expand All @@ -63,9 +54,8 @@ 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
RUN microdnf reinstall -y tzdata && \
microdnf clean all

USER 65534:65534

Expand Down