diff --git a/rhel9/Dockerfile b/rhel9/Dockerfile index 085006ba..84dd879a 100644 --- a/rhel9/Dockerfile +++ b/rhel9/Dockerfile @@ -54,6 +54,7 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3 echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict - RUN sh /tmp/install.sh depinstall && \ + sh /tmp/install.sh setup_cuda_repo && \ curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \ curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \ chmod +x /usr/local/bin/donkey /usr/local/bin/extract-vmlinux && \ @@ -93,9 +94,6 @@ LABEL release="N/A" LABEL summary="Provision the NVIDIA driver through containers" LABEL description="See summary" -# Add NGC DL license from the CUDA image -RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE - # Install / upgrade packages here that are required to resolve CVEs ARG CVE_UPDATES RUN if [ -n "${CVE_UPDATES}" ]; then \ diff --git a/rhel9/install.sh b/rhel9/install.sh index e9720497..e53b5aa3 100755 --- a/rhel9/install.sh +++ b/rhel9/install.sh @@ -41,6 +41,7 @@ dep_installer () { # Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64 # unzboot is only available on the EPEL RPM repo + rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9 dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm dnf config-manager --enable epel dnf install -y unzboot @@ -153,12 +154,19 @@ extra_pkgs_install() { fi } +setup_cuda_repo() { + OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa}; + dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${OS_ARCH}/cuda-rhel9.repo +} + if [ "$1" = "nvinstall" ]; then nvidia_installer elif [ "$1" = "depinstall" ]; then dep_installer elif [ "$1" = "extrapkgsinstall" ]; then extra_pkgs_install +elif [ "$1" = "setup_cuda_repo" ]; then + setup_cuda_repo else echo "Unknown function: $1" fi diff --git a/rhel9/ocp_dtk_entrypoint b/rhel9/ocp_dtk_entrypoint index 0bd1496d..a874d54f 100755 --- a/rhel9/ocp_dtk_entrypoint +++ b/rhel9/ocp_dtk_entrypoint @@ -28,7 +28,6 @@ nv-ctr-run-with-dtk() { /usr/local/bin/vgpu-util \ /usr/bin/unzboot \ /drivers \ - /licenses \ "$DRIVER_TOOLKIT_SHARED_DIR/" env | sed 's/=/="/' | sed 's/$/"/' > "$DRIVER_TOOLKIT_SHARED_DIR/env"