bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.81k stars 520 forks source link

Add additional NVIDIA driver modules to NVIDIA variants #3504

Open jhart0 opened 1 year ago

jhart0 commented 1 year ago

What I'd like:

Currently, some NVIDIA modules are excluded from the build, such as the nvidia-drm module: https://github.com/bottlerocket-os/bottlerocket/blob/develop/packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec

%exclude %{_cross_datadir}/nvidia/tesla/module-objects.d/nvidia-drm.mod.o
%exclude %{_cross_datadir}/nvidia/tesla/module-objects.d/nvidia-drm.o

These modules are required for applications that require the full NVIDIA driver, such as those using an X server in the container.

Any alternatives you've considered:

It is possible to build a custom image and include these modules, but to reduce toil it would be ideal if a variant already included the full driver.

stmcginnis commented 1 year ago

I'm not sure if there was an explicit reason for excluding those. @arnaldo2792, do you happen to know?

It seems like something that could easily be included, but I don't have the full background to know if there is a reason they are currently excluded.

arnaldo2792 commented 1 year ago

I've been talking with @jhart0 offline about this. There isn't any particular reason to exclude them, we decided to keep them out and let users request them if needed. There are a few additional libraries provided by the .run archive that we are excluding from the final image, we will include those as well. We didn't include these libraries before because libnvidia-container doesn't attempt to find them and make them available to the containers. But in @jhart0's use case, the libraries are needed, so they are mounted through pods' configurations.