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

feat: move from ubi to ubi-minimal #1825

Merged
merged 2 commits into from
Nov 5, 2024
Merged
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
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; \
rpm -i 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
Loading