diff --git a/ubuntu24.04/Dockerfile b/ubuntu24.04/Dockerfile index 363ac215..32c9a9dc 100644 --- a/ubuntu24.04/Dockerfile +++ b/ubuntu24.04/Dockerfile @@ -1,4 +1,6 @@ -FROM nvcr.io/nvidia/cuda:13.0.0-base-ubuntu24.04 as build +ARG BASE_IMAGE=ubuntu:noble-20250716 + +FROM ${BASE_IMAGE} as build ARG TARGETARCH ARG GOLANG_VERSION @@ -34,7 +36,7 @@ RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \ go build -o vgpu-util && \ mv vgpu-util /work -FROM nvcr.io/nvidia/cuda:13.0.0-base-ubuntu24.04 +FROM ${BASE_IMAGE} SHELL ["/bin/bash", "-c"] @@ -88,10 +90,4 @@ RUN if [ -n "${CVE_UPDATES}" ]; then \ rm -rf /var/lib/apt/lists/*; \ fi -# Remove cuda repository to avoid GPG errors -RUN rm -f /etc/apt/sources.list.d/cuda* - -# Add NGC DL license from the CUDA image -RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE - ENTRYPOINT ["nvidia-driver", "init"] diff --git a/ubuntu24.04/install.sh b/ubuntu24.04/install.sh index 084935ea..fa150c67 100755 --- a/ubuntu24.04/install.sh +++ b/ubuntu24.04/install.sh @@ -17,6 +17,7 @@ dep_install () { curl \ kmod \ file \ + gnupg \ libelf-dev \ libglvnd-dev \ pkg-config && \ @@ -29,6 +30,7 @@ dep_install () { curl \ kmod \ file \ + gnupg \ libelf-dev \ libglvnd-dev && \ rm -rf /var/lib/apt/lists/* @@ -36,10 +38,6 @@ dep_install () { } setup_cuda_repo() { - # Remove any existing CUDA GPG keys that are unconditionally trusted by apt - apt-key del 3bf863cc - rm /etc/apt/sources.list.d/cuda.list - # Fetch public CUDA GPG key and configure apt to only use this key when downloading CUDA packages OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa}; curl -fSsL "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/cuda-keyring_1.1-1_all.deb" -o cuda-keyring_1.1-1_all.deb