Add OCI standard image labels - #970
Conversation
|
@karthikvetrivel can we update the PR description. We can get this merged today and add to next release. |
3a1919c to
510ce13
Compare
| LABEL org.opencontainers.image.title="NVIDIA Driver Container" | ||
| LABEL org.opencontainers.image.url="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/driver" | ||
| LABEL org.opencontainers.image.vendor="NVIDIA" | ||
| LABEL org.opencontainers.image.version="${DRIVER_VERSION}" |
There was a problem hiding this comment.
Image version has kernel version (in case of precompiled) and OS appended to it. Example: nvcr.io/nvidia/driver:595-6.8.0-1060-aws-ubuntu24.04 (precompiled), nvcr.io/nvidia/driver:580.173.02-rhel10 (non-precompiled).
There was a problem hiding this comment.
Updated org.opencontainers.image.version to match the published tag format in all Dockerfiles:
- non-precompiled:
${DRIVER_VERSION}-<dist> - precompiled ubuntu:
${DRIVER_BRANCH}-${KERNEL_VERSION}-<dist> - precompiled rhel9/10:
${DRIVER_VERSION}-${KERNEL_VERSION}-${OS_TAG}(rhel8 has no OS_TAG arg, so${DRIVER_VERSION}-${KERNEL_VERSION}-rhel8) - vgpu-manager:
${DRIVER_VERSION}-<dist>
Note: rocky builds reuse the rhel Dockerfiles, so those side-builds will carry the rhel dist suffix (same caveat as image.base.name).
There was a problem hiding this comment.
Note: rocky builds reuse the rhel Dockerfiles, so those side-builds will carry the rhel dist suffix (same caveat as image.base.name)
Is there an env variable accessible inside the Dockerfile that gives rocky info during builds? The actual images do have -rocky* suffix, so rhel suffix is not fully accurate. Not a blocker though.
There was a problem hiding this comment.
So this information is in the Makefile but doesn't get passed to the build. However, I made another change to pass DIST as a build arg and declare ARG DIST=<distro-default> in each Dockerfile.
Now, rocky builds should have the rocky suffix.
0522cfc to
181ac40
Compare
| LABEL org.opencontainers.image.title="NVIDIA Driver Container" | ||
| LABEL org.opencontainers.image.url="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/driver" | ||
| LABEL org.opencontainers.image.vendor="NVIDIA" | ||
| LABEL org.opencontainers.image.version="${DRIVER_VERSION}-${KERNEL_VERSION}-rhel8" |
There was a problem hiding this comment.
Should rhel8 be replaced by OS_TAG here?
Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
181ac40 to
731bf6c
Compare
This PR adds well-known OCI Image labels to the gpu-driver-container image metadata.
Before
After — ubuntu24.04 image built from this branch