Repository navigation
distro: rhel10: add AMI with Nvidia software stack - #2715
Conversation
42eda06 to
571ceb1
Compare
|
We've done similar things to the script embedding before but I agree it's not the best. Ideally it would be packaged in an RPM. Maybe we can do that eventually but for now, perhaps it would be better to do what we do for the pxe iso files here: image-builder/pkg/manifest/pxetree.go Line 14 in bec57b5 Thought I'm not fond of that being defined in the pipeline generator instead of the image definition either. |
Maybe we shouldn't do that. The friction here is fine it should be living in a package, if we want to use it in multiple image types a We make things very undiscoverable with that embedded filesystem and users can't (easily) override it anymore. |
|
What I tried as an experiment is a hybrid: have the script in the embedded FS under That keeps the injection visible in the image definition (unlike with the pattern used for PXE), while still avoiding inlining the script body in YAML. The same approach could replace the existing Azure image-builder/data/distrodefs/rhel-10/imagetypes.yaml Lines 530 to 532 in aa77990 Open for suggestions how to proceed. |
4ad49ac to
9280b89
Compare
croissanne
left a comment
There was a problem hiding this comment.
I don't have a strong opinion on the rpm vs embedding thing. Obviously the ideal is an rpm. Or maybe an osbuild nvidia-tweak stage? Not sure.
Rpmrepo will need an update to support the new repos though.
| }, | ||
| { | ||
| "name": "supplementary", | ||
| "baseurl": "https://cdn.redhat.com/content/dist/rhel10/10.3/x86_64/supplementary/os", |
There was a problem hiding this comment.
These should be added to rpmrepo snapshots (github.com/osbuild/rpmrepo). I don't think 10.3 cdn content is available yet.
There was a problem hiding this comment.
Right, the mid to long term idea is to create a rpm package out of it. As that will take some time to roll out, we need a temporary, and acceptable, solution until then.
Thank you for the pointer regarding the rpmrepo; I will add the new repos there.
There was a problem hiding this comment.
I've added the supplementary and extensions repos for rhel10.2 to rpmrepo, and switched to the latest 20261005 snapshot
|
I've changed the PR to only make
|
ondrejbudai
left a comment
There was a problem hiding this comment.
I wonder if we should blacklist nouveau like RHEL AI does. It seems to me that since we ship the nvidia drivers, it's not a stupid thing to do.
A snippet from RHEL AI:
echo "blacklist nouveau" > /etc/modprobe.d/blacklist_nouveau.conf
I don't think this is blocking at this point, just something I found randomly.
Leave saphana repo on last nightly snapshot, as currently no new snapshots are created.
Introduce an AMI image type that ships the open NVIDIA driver, CUDA toolkit, and other utilities. Add the supplementary and extensions repositories - which contain the necessary packages - for this image type. The image is intentionally not made available for upcoming RHEL10.3, as the necessary repos and packages do not exist yet.
Add oneshot service that forces the GPU core clock (and memory clock where applicable) to the maximum supported clock for consistent peak performance. Clock values from: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/optimize_gpu.html
…are present Add systemd drop-ins under /usr/lib so nvidia-fabricmanager starts only when /proc/driver/nvidia-nvswitch/devices is non-empty, i.e. the system has NVSwitches. Otherwise the nvidia-fabricmanager service will fail starting. Also make the start sequence is nvidia-fabricmanager -> nvidia-persistenced -> nvidia-gpu-tweaks.
Cap idle cores at C1 (processor/intel_idle.max_cstate=1), matching AWS DLAMI, to reduce wake latency for GPU/NCCL workloads.
image-builder/data/distrodefs/rhel-10/imagetypes.yaml Lines 1627 to 1630 in 31f07db |
stupid me, thanks for pointing that out! |
supakeen
left a comment
There was a problem hiding this comment.
Thanks looks OK. I guess we can't easily do drop in partials with the systemd config?
I checked before creating the drop-in manually, and in its current form unfortunately not. That being said, the modification to |
This adds a new
ami-nvidiaimage type for RHEL 10 aimed at NVIDIA GPU instances on EC2.It's basically a normal AMI, plus the NVIDIA/CUDA stack from the RHEL10 supplementary and extensions repos (driver, open kmod, CUDA toolkit, fabric manager, persistenced).
On top of that there's a small oneshot service (
nvidia-gpu-tweaks) that looks at the GPU name and locks GPU/memory clocks to the maxima AWS documents here:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/optimize_gpu.html
That way one gets consistent peak clocks instead of whatever the GPU boost decides to do.
The script is - for now - embedded in the
imagetypes.yamlwhich is not pretty.