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

intel-idxd-config-initcontainer cannot use UBI base images. #1693

Open
mregmi opened this issue Mar 20, 2024 · 5 comments
Open

intel-idxd-config-initcontainer cannot use UBI base images. #1693

mregmi opened this issue Mar 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mregmi
Copy link
Member

mregmi commented Mar 20, 2024

Describe the support request
intel-idxd-config-initcontainer cannot be used in OpenShift. The idxd-config initcontainer cannot use UBI minimal images as it is using apt-get to install accel-config. All other Dockerfiles are compatible with UBI. Can we make so that this can also be used with UBI?

System (please complete the following information if applicable):

  • OS version: RHEL 9.2 (openshift)
  • Kernel version: Linux 5.15
  • Device plugins version: v0.29.0
  • Hardware info: DSA
@mythi
Copy link
Contributor

mythi commented Mar 21, 2024

Can we make so that this can also be used with UBI?

we would not be able to validate (test build) that image since we cannot install accel-config from UBI without the subscription. I guess we could maintain the conditional build flow but we'd need your help to make it suitable for your needs

@mregmi
Copy link
Member Author

mregmi commented Mar 21, 2024

Sure, we are happy to help. we might need help to understand how the conditional flow work in the codebase.

@tkatila
Copy link
Contributor

tkatila commented Mar 28, 2024

Would something like this work?

ARG BASEIMG=debian:unstable-slim
FROM ${BASEIMG}
ARG USE_DNF=0
COPY ./LICENSE /licenses/intel-device-plugins-for-kubernetes/LICENSE
RUN if [ $USE_DNF -eq 0 ]; then \
    apt-get update && apt-get install -y --no-install-recommends accel-config jq && rm -rf /var/lib/apt/lists/\*; \
    else dnf install -y accel-config jq; fi
COPY demo/idxd-init.sh /usr/local/bin/
COPY demo/dsa.conf /idxd-init/
COPY demo/iaa.conf /idxd-init/
RUN mkdir /idxd-init/scratch
WORKDIR /idxd-init
ENTRYPOINT ["/usr/local/bin/idxd-init.sh"]

Without build arguments, it would generate the debian based version. With BASEIMG=ubi-something-minimal and USE_DNF=1 it would generate the ubi based one.

Tested with rockylinux:9 which worked, but I'm not sure how the ubi image works.

@mregmi
Copy link
Member Author

mregmi commented Mar 29, 2024

We can test this approach and let you know. Thanks

@mythi
Copy link
Contributor

mythi commented Apr 2, 2024

Without build arguments, it would generate the debian based version.

This has two problems: 1) the OCP build environment (at least used to) does not allow users to add custom build args so the default needs to be what OCP expects and our builder adds custom args, 2) our builder setup currently knows only about "distroless" base image for all the Go images so some additional logic would be needed to decide when to use distroless vs debian.

@tkatila tkatila added the enhancement New feature or request label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants