diff --git a/bootc-nvidia-base-fedora/Containerfile b/bootc-nvidia-base-fedora/Containerfile index db061bc..4b7f32a 100644 --- a/bootc-nvidia-base-fedora/Containerfile +++ b/bootc-nvidia-base-fedora/Containerfile @@ -53,4 +53,4 @@ RUN echo "blacklist nouveau" > /etc/modprobe.d/blacklist_nouveau.conf COPY usr/ /usr/ #! Enable necessary services to be started at boot -RUN systemctl enable nvidia-toolkit-firstboot.service nvidia-drivers.service +RUN systemctl enable nvidia-toolkit-firstboot.service nvidia-drivers.service nvidia-persist.service diff --git a/bootc-nvidia-base-fedora/usr/lib/systemd/system/nvidia-persist.service b/bootc-nvidia-base-fedora/usr/lib/systemd/system/nvidia-persist.service new file mode 100644 index 0000000..c79a8c2 --- /dev/null +++ b/bootc-nvidia-base-fedora/usr/lib/systemd/system/nvidia-persist.service @@ -0,0 +1,12 @@ +[Unit] +Description=NVIDIA Persistence Daemon +Wants=syslog.target +After=nvidia-drivers.service + +[Service] +Type=forking +ExecStart=/usr/bin/nvidia-persistenced --user root +ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced + +[Install] +WantedBy=multi-user.target \ No newline at end of file