NVIDIA / yum-packaging-nvidia-driver

NVIDIA driver packaging for RHEL
Apache License 2.0
8 stars 4 forks source link

[FEATURE] RHEL module stream named `latest-kmod` #7

Open jcpunk opened 1 year ago

jcpunk commented 1 year ago

My config management utility (puppet) is unable to distinguish between the module stream named latest and finding the most recent module stream ("latest"). On some hosts it picks up the dkms stream and on others the kmod stream, depending on when exactly it was run.

Can there be a stream named latest-kmod added so it is both explicit and something I can target?

kmittman commented 1 year ago

Hi @jcpunk

I see that Puppet has a dnfmodule provider. Have you looked at the ensure attribute (equiv to DNF module stream) and flavor attribute (equiv to DNF module profile) So, I think that would be something like

{name: "nvidia-driver", ensure: "latest-dkms", flavor: "default", provider: :dnfmodule}

An alternative option could be Kickstart, which is "modules"-aware, see: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/#kickstart-installation

%packages
@^Minimal Install
@nvidia-driver:latest-dkms
%end
jcpunk commented 1 year ago

Alas, I'm trying to get the kmod stream and not the dkms one.

With the dnfmodule provider "latest" is interpreted as "get me the most recent" which then gets translated into "use the default" for some reason. There doesn't actually seem to be a way to tell puppet to use a DNF Module stream named "latest". If it happens to be the default stream, then it would work out but...

To be clear, I'm not asking to change the default stream.

Quick replication:


puppet apply -e "
package
{'nvidia-driver':   ensure   => 'latest',   flavor   => 'fm',   provider => 'dnfmodule', }
dnf module list
"
kmittman commented 1 year ago

Ohhh, I see. Because the string "latest" already has a special meaning to Puppet's ensure attribute, which itself is overloaded to support DNF's concept of module streams.

Hmm I wonder if that was intentional or something missed in this pull request.

Trying to jog my memory. I seem to recall a correspondence about kmod packages for ~Scientific Linux~ or Rocky Linux or maybe CentOS Stream...

So what I'm trying to ask is are these precompiled kmod packages coming from the CUDA repo or are they DIY using the .spec file in this (or related) GitHub repository ?


If they are DIY, then presumably you would already be generating your own modules YAML, in which case, the simplest option would be to add a CLI flag to genmodules.yaml to alter the latest stream name.

On the other hand, if you are simply consuming the CUDA repo packages and metadata as-is, then ...

So I think going to need to mull this around some more and maybe see if there is any response on the Puppet ticket you filed.

jcpunk commented 1 year ago

Sounds good.

I am consuming the official repos directly.

And yep, I am one of the folks who occasionally works on out of stream stuff. :)