diff --git a/.common-ci.yml b/.common-ci.yml index 14e7c50ad..fff759bab 100644 --- a/.common-ci.yml +++ b/.common-ci.yml @@ -69,9 +69,9 @@ trigger-pipeline: - when: always # The .dist- dummy steps set the DIST variable for the targeted distribution. -.dist-ubi8: +.dist-ubi9: variables: - DIST: "ubi8" + DIST: "ubi9" # Define the platform targets .platform-amd64: @@ -119,22 +119,22 @@ trigger-pipeline: - .scan-base # Define the scan targets -scan-ubi8-amd64: +scan-ubi9-amd64: extends: - .scan - - .dist-ubi8 + - .dist-ubi9 - .platform-amd64 needs: - - image-ubi8 + - image-ubi9 -scan-ubi8-arm64: +scan-ubi9-arm64: extends: - .scan - - .dist-ubi8 + - .dist-ubi9 - .platform-arm64 needs: - - image-ubi8 - - scan-ubi8-amd64 + - image-ubi9 + - scan-ubi9-amd64 # Download the regctl binary for use in the release steps .regctl-setup: @@ -203,9 +203,9 @@ scan-ubi8-arm64: variables: OUT_IMAGE_VERSION: "${DEVEL_RELEASE_IMAGE_VERSION}" -release:staging-ubi8: +release:staging-ubi9: extends: - .release:staging - - .dist-ubi8 + - .dist-ubi9 needs: - - image-ubi8 + - image-ubi9 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 4e563ebe2..9d0e7fcc1 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -48,7 +48,7 @@ jobs: env: KUBECONFIG: ${{ github.workspace }}/kubeconfig E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin - E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubi8 + E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubi9 LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs run: | make test-e2e diff --git a/.github/workflows/staging_e2e.yaml b/.github/workflows/staging_e2e.yaml index 8f10c1073..5455403f1 100644 --- a/.github/workflows/staging_e2e.yaml +++ b/.github/workflows/staging_e2e.yaml @@ -60,7 +60,7 @@ jobs: env: KUBECONFIG: ${{ github.workspace }}/kubeconfig E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin - E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubi8 + E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubi9 LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs run: | make test-e2e diff --git a/.nvidia-ci.yml b/.nvidia-ci.yml index 8ec7dae01..fc3681969 100644 --- a/.nvidia-ci.yml +++ b/.nvidia-ci.yml @@ -65,10 +65,10 @@ variables: - regctl registry login "${OUT_REGISTRY}" -u "${OUT_REGISTRY_USER}" -p "${OUT_REGISTRY_TOKEN}" - make -f deployments/container/Makefile IMAGE=${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST} OUT_IMAGE=${OUT_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}-${DIST} push-${DIST} -image-ubi8: +image-ubi9: extends: - .image-pull - - .dist-ubi8 + - .dist-ubi9 # We skip the integration tests for the internal CI: .integration: @@ -113,10 +113,10 @@ image-ubi8: # Define the external release targets # Release to NGC -release:ngc-ubi8: +release:ngc-ubi9: extends: - .release:ngc - - .dist-ubi8 + - .dist-ubi9 # Define the external image signing steps for NGC # Download the ngc cli binary for use in the sign steps @@ -160,13 +160,13 @@ sign:ngc-short-tag: extends: - .sign:ngc needs: - - release:ngc-ubi8 + - release:ngc-ubi9 variables: IMAGE_TAG: "${CI_COMMIT_TAG}" -sign:ngc-ubi8: +sign:ngc-ubi9: extends: - - .dist-ubi8 + - .dist-ubi9 - .sign:ngc needs: - - release:ngc-ubi8 + - release:ngc-ubi9 diff --git a/deployments/container/Dockerfile b/deployments/container/Dockerfile index 79e6b8156..ae2c6d997 100644 --- a/deployments/container/Dockerfile +++ b/deployments/container/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. ARG GOLANG_VERSION=1.22.6 -FROM nvcr.io/nvidia/cuda:12.6.0-base-ubi8 AS build +FROM nvcr.io/nvidia/cuda:12.6.0-base-ubi9 AS build RUN yum install -y \ wget make git gcc \ @@ -44,14 +44,14 @@ ARG VERSION="N/A" ARG GIT_COMMIT="unknown" RUN make PREFIX=/artifacts cmds -# We use the ubi8-minimal image as a reference image in removing unneeded dependencies. -FROM redhat/ubi8-minimal:latest AS minimal +# We use the ubi9-minimal image as a reference image in removing unneeded dependencies. +FROM redhat/ubi9-minimal:latest AS minimal RUN rpm -qa --queryformat='^%{NAME}-\[0-9\].*\.%{ARCH}$\n' | sort -u > /tmp/package-names.minimal RUN rpm -qa | sort -u > /tmp/package-list.minimal # We define the following image as a base image and remove unneeded packages. -FROM nvcr.io/nvidia/cuda:12.6.0-base-ubi8 AS base +FROM nvcr.io/nvidia/cuda:12.6.0-base-ubi9 AS base WORKDIR /cleanup diff --git a/deployments/container/Makefile b/deployments/container/Makefile index 150ee5324..04a4b8cdf 100644 --- a/deployments/container/Makefile +++ b/deployments/container/Makefile @@ -38,7 +38,7 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(DIST) OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG) ##### Public rules ##### -DEFAULT_PUSH_TARGET := ubi8 +DEFAULT_PUSH_TARGET := ubi9 DISTRIBUTIONS = $(DEFAULT_PUSH_TARGET) IMAGE_TARGETS := $(patsubst %,image-%,$(DISTRIBUTIONS)) diff --git a/deployments/container/cleanup/cleanup.sh b/deployments/container/cleanup/cleanup.sh index 8c068c4fa..c63cb2faa 100755 --- a/deployments/container/cleanup/cleanup.sh +++ b/deployments/container/cleanup/cleanup.sh @@ -35,21 +35,21 @@ for key in $(rpm -qa gpg-pubkey*); do fi done -dnf clean all +dnf clean -y all rm -rf /var/cache/dnf dnf install -y microdnf -microdnf remove $(rpm -q --whatrequires dnf) +microdnf remove -y $(rpm -q --whatrequires dnf) rpm -e dnf -microdnf remove \ +microdnf remove -y \ $(rpm -q --whatrequires /usr/libexec/platform-python) \ $(rpm -q --whatrequires 'python(abi)') \ python* \ dnf* -microdnf remove \ +microdnf remove -y \ $(rpm -qa | sort | grep -v -f package-names.minimal -e gpg-pubkey) # We don't want to add third-party content to the base image and only remove packages.