Skip to content

Commit

Permalink
Enable NVIDIA services in the bootc image
Browse files Browse the repository at this point in the history
The `nvidia-persistenced` and `nvidia-fabricmanager` services should be
started on machines with NVIDIA devices. Fabric Manager is only needed
on machines with an NVLink switch, so we patch it to start only if
/dev/nvswitchctl is present.

Signed-off-by: Fabien Dupont <[email protected]>
  • Loading branch information
fabiendupont authored and tsorya committed Jul 10, 2024
1 parent 266831d commit 2e94759
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion training/nvidia-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ RUN mv /etc/selinux /etc/selinux.tmp \
&& ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants \
&& mv /etc/selinux.tmp /etc/selinux \
&& ln -s /usr/lib/systemd/system/nvidia-toolkit-firstboot.service /usr/lib/systemd/system/basic.target.wants/nvidia-toolkit-firstboot.service \
&& echo "blacklist nouveau" > /etc/modprobe.d/blacklist_nouveau.conf
&& echo "blacklist nouveau" > /etc/modprobe.d/blacklist_nouveau.conf \
&& sed '/\[Unit\]/a ConditionPathExists = /dev/nvidia-nvswitchctl' /usr/lib/systemd/system/nvidia-fabricmanager.service \
&& ln -s /usr/lib/systemd/system/nvidia-fabricmanager.service /etc/systemd/system/multi-user.target.wants/nvidia-fabricmanager.service \
&& ln -s /usr/lib/systemd/system/nvidia-persistenced.service /etc/systemd/system/multi-user.target.wants/nvidia-persistenced.service

ARG SSHPUBKEY

Expand Down

0 comments on commit 2e94759

Please sign in to comment.