Skip to content

Commit

Permalink
add check for nvidia driver download
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume committed Jan 16, 2025
1 parent 2562048 commit 12d8a64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
11 changes: 2 additions & 9 deletions build_files/playbooks/install-packages.ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,29 @@
- distrobox
- hwinfo
- fswatch
# - gnome-session-xsession
- gcc
- htop
- ifuse
- inxi
- kitty
- libva-utils
- libtree-sitter
- lm_sensors
- make
- material-icons-fonts
- nvidia-vaapi-driver
- opencl-filesystem
- plymouth-theme-spinfinity
- samba
- vdpauinfo
- xclip
# - xorg-x11-server-devel
# - setxkbmap
# - xhost
# - xmodmap
# - xorg-x11-xauth
# - xorg-x11-xinit
# - xrdb
- zsh
state: present

- name: Remove packages
ansible.builtin.dnf:
name:
- firefox
# - mesa-va-drivers
- firefox-langpacks
- virtualbox-guest-additions # because of the dependencies on the kernel package
state: absent
Expand Down
9 changes: 6 additions & 3 deletions build_files/scripts/nvidia-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ _systemd_util_dir=/usr/lib/systemd
if [ ! -d "nvidia_tmp" ]; then
# download
curl -O https://download.nvidia.com/XFree86/Linux-"${ARCH}"/"${NVIDIA_VERSION}"/NVIDIA-Linux-"${ARCH}"-"${NVIDIA_VERSION}".run

# extract
sh ./NVIDIA-Linux-"${ARCH}"-"${NVIDIA_VERSION}".run --extract-only --target nvidia_tmp
fi

if [ ! -d "nvidia_tmp" ]; then
echo "failed to extract nvidia driver package does exist."
exit 1
fi

# Import external functions
source "$(dirname "$0")"/functions.sh
# Disable repos unwanted repos
# disable-repo /etc/yum.repos.d/fedora-cisco-openh264.repo
# disable-repo /etc/yum.repos.d/fedora-updates.repo
disable-repo /etc/yum.repos.d/fedora-updates-testing.repo
disable-repo /etc/yum.repos.d/fedora-updates-archive.repo

Expand Down Expand Up @@ -53,7 +57,6 @@ install -p -m 0755 -D systemd/system-sleep/nvidia ${_systemd_util_dir}/system-sl
install -p -m 0644 -D nvidia-dbus.conf ${_datadir}/dbus-1/system.d/nvidia-dbus.conf

systemctl enable nvidia-hibernate nvidia-resume nvidia-suspend
nvidia-xconfig --allow-empty-initial-configuration --no-sli --base-mosaic
ldconfig

mkdir -p /usr/share/pixmaps
Expand Down

0 comments on commit 12d8a64

Please sign in to comment.