Skip to content

Commit

Permalink
feat: move from ubi to ubi-minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
maichouni-mitek committed Oct 24, 2024
1 parent 0f5c40e commit cfde359
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN make tidy-vendor format

RUN make build

FROM registry.access.redhat.com/ubi9:latest
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
# NOTE: use bash instead of sh
SHELL ["/bin/bash", "-c"]

Expand All @@ -32,28 +32,28 @@ ENV NVIDIA_DRIVER_CAPABILITIES=utility
ENV NVIDIA_MIG_MONITOR_DEVICES=all
ENV NVIDIA_MIG_CONFIG_DEVICES=all

RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical && yum clean all
RUN microdnf clean all && microdnf upgrade -y --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 && microdnf clean all
# NOTE: set -e ensure all fails results in a non-zero exit code (i.e. fail)
RUN set -e -x ;\
INSTALL_PKGS=" \
libbpf \
" ;\
yum install -y $INSTALL_PKGS ;\
microdnf install -y $INSTALL_PKGS ;\
\
if [[ "$TARGETARCH" == "amd64" ]]; then \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm; \
yum install -y cpuid; \
microdnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm; \
microdnf install -y cpuid; \
if [[ "$INSTALL_DCGM" == "true" ]]; then \
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo; \
yum install -y datacenter-gpu-manager libnvidia-ml; \
curl https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo -o /etc/yum.repos.d/cuda-rhel9.repo; \
microdnf install -y datacenter-gpu-manager libnvidia-ml; \
fi; \
if [[ "$INSTALL_HABANA" == "true" ]]; then \
rpm -Uvh https://vault.habana.ai/artifactory/rhel/9/9.2/habanalabs-firmware-tools-1.15.1-15.el9.x86_64.rpm --nodeps; \
echo /usr/lib/habanalabs > /etc/ld.so.conf.d/habanalabs.conf; \
ldconfig; \
fi; \
fi;\
yum clean all
microdnf clean all

COPY --from=builder /workspace/_output/bin/kepler /usr/bin/kepler
COPY --from=builder /libbpf-source/linux-5.14.0-424.el9/tools/bpf/bpftool/bpftool /usr/bin/bpftool
Expand Down

0 comments on commit cfde359

Please sign in to comment.