Skip to content

Commit

Permalink
Add NVIDIA driver packages and kmod build process to server configura…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
karuboniru committed Feb 17, 2025
1 parent 714f2f6 commit 4080a29
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nvidia.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[nvidia]
name=RPM Fusion for Fedora $releasever - Nonfree - NVIDIA Driver
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/nvidia-driver/$releasever/$basearch/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-nvidia-driver-$releasever&arch=$basearch
enabled=1
type=rpm-md
gpgcheck=0
repo_gpgcheck=0
skip_if_unavailable=True

23 changes: 23 additions & 0 deletions server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repos:
- fedora-41
- fedora-41-updates
- ctk
- nvidia
# - llvm-snapshot
# - llvm-snapshot-rundep

Expand Down Expand Up @@ -248,6 +249,16 @@ packages:
- nvidia-container-toolkit
- nvidia-container-toolkit-selinux

- nvidia-modprobe
- xorg-x11-drv-nvidia-libs
- nvidia-persistenced
- xorg-x11-drv-nvidia
- xorg-x11-drv-nvidia-cuda
- xorg-x11-drv-nvidia-power
- xorg-x11-drv-nvidia-kmodsrc
- xorg-x11-drv-nvidia-cuda-libs
- nvidia-settings

exclude-packages:
- firefox
- pipewire
Expand Down Expand Up @@ -278,6 +289,18 @@ postprocess:
echo containers:2147483647:2147483648 > /etc/subuid
echo containers:2147483647:2147483648 > /etc/subgid
kmodsrc=$(realpath /usr/share/nvidia-kmod-*/*.tar.xz)
if [ -f $kmodsrc ]; then
kmodule_path=$(realpath /lib/modules/*)
kernel_uname=$(basename $kmodule_path)
mkdir -p /tmp/kmod-build
tar -xvf $kmodsrc -C /tmp/kmod-build
cd /tmp/kmod-build/kernel
make -O V=1 VERBOSE=1 CC='gcc -O2' LD=ld.bfd KERNEL_UNAME=${kernel_uname} modules
make -O V=1 VERBOSE=1 CC='gcc -O2' LD=ld.bfd KERNEL_UNAME=${kernel_uname} modules_install
fi
add-files:
[
["cils/adguardhome.cil", "/etc/cils/adguardhome.cil"],
Expand Down

0 comments on commit 4080a29

Please sign in to comment.