Skip to content

Switch to distroless base image #1417

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

cdesiniotis
Copy link
Contributor

No description provided.


# Remove CUDA libs(compat etc) in favor of libs installed by the NVIDIA driver
RUN dnf remove -y cuda-*
USER 0:0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does validator need to run as root?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm it doesn't appear I have anything written in my notes concerning this (I made these changes some time ago). My best guess is that this was needed for the driver-validation container where we create the /dev/char symlinks. But it is definitely worth validating and removing this if not required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, once you find out why it's needed and we are certain that there is no way around this, please update the PR description with the details

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we run chroot to check for host driver installation, which needs to be run with root user.

@@ -55,10 +55,15 @@ ARG VERSION="unknown"
ARG GIT_COMMIT="unknown"
RUN make gpu-operator

FROM nvcr.io/nvidia/cuda:12.8.1-base-ubi9
# Download must-gather dependency: `kubectl`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can avoid packaging kubectl binary too. This often have CVEs. For openshift, we can publish a minimal image into RH registry like these. Which is used only during log collection using oc adm must-gather --image <debug-image>. For K8s users, they will use the script directly from the GH repo anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently still need it for the upgrade-crd and cleanup-crd helm hooks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, those can be replaced with the crd-apply tool that the NO is using.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure, Shiva. We do have that plan. So, It will be done in a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants