File tree Expand file tree Collapse file tree 7 files changed +45
-1
lines changed
mkosi.presets/system/mkosi.conf.d
usr/lib/systemd/system-preset Expand file tree Collapse file tree 7 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ mv "${BUILDROOT}/etc/issue.d" "${BUILDROOT}/usr/lib/issue.d" || true
1111 echo " IMAGE_ID=\" podvm\" "
1212 echo " IMAGE_VERSION=\" ${IMAGE_VERSION-v0.0.0} \" "
1313 echo " VARIANT_ID=\" ${VARIANT_ID} \" "
14- } >> " ${BUILDROOT} /etc/os-release"
14+ } >> " ${BUILDROOT} /etc/os-release"
1515
1616# remove unused units of legacy image
1717rm -f " ${BUILDROOT} " /etc/systemd/system/{run-image,run-kata\x 2dcontainers}.mount
@@ -25,3 +25,8 @@ ln -s /dev/null "${BUILDROOT}/etc/systemd/system/
[email protected] "
2525ln -s /dev/null " ${BUILDROOT} /etc/systemd/system/systemd-pcrphase-initrd.service"
2626ln -s /dev/null " ${BUILDROOT} /etc/systemd/system/systemd-pcrphase-sysinit.service"
2727ln -s /dev/null " ${BUILDROOT} /etc/systemd/system/systemd-pcrphase.service"
28+
29+ # Update NVIDIA config
30+ #
31+ echo -e " blacklist nouveau\nblacklist nova_core" > /etc/modprobe.d/blacklist_nv_alt.conf
32+ #
Original file line number Diff line number Diff line change 1+ [Match]
2+ Distribution=fedora
3+
4+ [Content]
5+ Packages=
6+ nvidia-container-toolkit
7+ # 570.172.08 or newer is required due to: https://github.com/NVIDIA/open-gpu-kernel-modules/issues/893
8+ nvidia-driver-cuda-570.172.08
9+ kmod-nvidia-open-dkms-570.172.08
Original file line number Diff line number Diff line change 1+ [cuda-fedora41-x86_64]
2+ name=cuda-fedora41-x86_64
3+ baseurl=https://developer.download.nvidia.com/compute/cuda/repos/fedora41/x86_64
4+ enabled=1
5+ gpgcheck=1
6+ gpgkey=https://developer.download.nvidia.com/compute/cuda/repos/fedora41/x86_64/D42D0685.pub
Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ enable setup-nat-for-imds.service
1010enable gen-issue.service
1111enable image-env.service
1212enable scratch-storage.service
13+
14+ enable nvidia-cdi.service
Original file line number Diff line number Diff line change 1+ ../nvidia-cdi.service
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Generate NVIDIA CDI Configuration
3+ Before =kata-agent.service
4+
5+ [Service]
6+ Type =oneshot
7+ ExecStart =/usr/local/bin/generate-nvidia-cdi.sh
8+ RemainAfterExit =true
9+
10+ [Install]
11+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # load drivers
4+ nvidia-ctk -d system create-device-nodes --control-devices --load-kernel-modules
5+
6+ nvidia-persistenced
7+ # set confidential compute to ready state
8+ nvidia-smi conf-compute -srs 1
9+ # Generate NVIDIA CDI configuration
10+ nvidia-ctk cdi generate --output=/var/run/cdi/nvidia.yaml > /var/log/nvidia-cdi-gen.log 2>&1
You can’t perform that action at this time.
0 commit comments