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

[ubuntu24.04] only install required driver packages #186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ RUN if [ -n "${CVE_UPDATES}" ]; then \
fi

# update pkg cache and install pkgs for userspace driver libs
RUN apt-get update && apt-get install -y --download-only --no-install-recommends nvidia-driver-${DRIVER_BRANCH}-server \
RUN apt-get update && apt-get install -y --download-only --no-install-recommends \
nvidia-utils-${DRIVER_BRANCH}-server \
nvidia-compute-utils-${DRIVER_BRANCH}-server \
libnvidia-cfg1-${DRIVER_BRANCH}-server \
nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*;
Expand Down
12 changes: 4 additions & 8 deletions ubuntu24.04/precompiled/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,10 @@ _unload_driver() {
# Link and install the kernel modules from a precompiled packages
_install_driver() {
# Install necessary driver userspace packages
apt-get install -y --no-install-recommends nvidia-driver-${DRIVER_BRANCH}-server

# Uninstall unnecessary packages installed as a part of the nvidia-driver-${DRIVER_BRANCH}-server package
apt-get purge -y \
libnvidia-egl-wayland1 \
nvidia-dkms-${DRIVER_BRANCH}-server \
nvidia-kernel-source-${DRIVER_BRANCH}-server \
xserver-xorg-video-nvidia-${DRIVER_BRANCH}-server
apt-get install -y --no-install-recommends \
nvidia-utils-${DRIVER_BRANCH}-server \
nvidia-compute-utils-${DRIVER_BRANCH}-server \
libnvidia-cfg1-${DRIVER_BRANCH}-server

# Now install the precompiled kernel module packages signed by Canonical
if [ "$OPEN_KERNEL_MODULES_ENABLED" = true ]; then
Expand Down
Loading