Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions gpu_benchmark/benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 United Kingdom Research and Innovation
# Copyright (c) 2026 United Kingdom Research and Innovation

set -e

Expand All @@ -22,7 +22,6 @@ DIR="$(cd "$(dirname "$0")" && pwd)"
nvidia-smi || bash "$DIR/gpu_setup.sh"


sudo dnf install phoronix-test-suite xorg-x11-server-Xvfb -y

echo '<?xml version="1.0"?>
<!--Phoronix Test Suite v10.8.4-->
Expand Down
21 changes: 21 additions & 0 deletions gpu_benchmark/benchmark_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2026 United Kingdom Research and Innovation
set -ex

OS_NAME=$(awk -F= '/^NAME=/{gsub("\"","",$2); print $2}' /etc/os-release)

case "$OS_NAME" in
"Ubuntu"*)
git clone https://github.com/phoronix-test-suite/phoronix-test-suite.git
cd phoronix-test-suite/
sudo ./install-sh
sudo apt install xvfb -y
sudo apt-get install php-cli php-xml -y
sudo reboot now
;;
"Rocky Linux"*)
sudo dnf install phoronix-test-suite xorg-x11-server-Xvfb -y
;;
esac

42 changes: 28 additions & 14 deletions gpu_benchmark/gpu_setup.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 United Kingdom Research and Innovation
# Copyright (c) 2026 United Kingdom Research and Innovation
set -ex

sudo dnf update -y
DRIVER_VER="590"
OS_NAME=$(awk -F= '/^NAME=/{gsub("\"","",$2); print $2}' /etc/os-release)

# # Nvidia drivers - centos8
echo 'blacklist nouveau
options nouveau modeset=0' > /usr/lib/modprobe.d/blacklist-nouveau.conf
echo "Updating dracut"
sudo dracut --force
(lsmod | grep -wq nouveau && echo "Rebooting to disable nouveau" && sudo reboot) || true
case "$OS_NAME" in
"Ubuntu"*)
sudo apt update -y
sudo apt install nvidia-driver-"$DRIVER_VER" -y
;;

sudo dnf install tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel -y
sudo dnf install -y kernel-devel kernel-headers -y
"Rocky Linux"*)
sudo dnf update -y

VERSION=$(awk -F= '/^VERSION_ID=/ {gsub("\"","",$2); print $2}' /etc/os-release 2>/dev/null || true)
echo 'blacklist nouveau
options nouveau modeset=0' > /usr/lib/modprobe.d/blacklist-nouveau.conf
echo "Updating dracut"
sudo dracut --force
(lsmod | grep -wq nouveau && echo "Rebooting to disable nouveau" && sudo reboot) || true

sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel"${VERSION%%.*}"/"$(uname -m)"/cuda-rhel"${VERSION%%.*}".repo
sudo dnf install nvidia-driver-assistant -y
sudo dnf install tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel -y
sudo dnf install -y kernel-devel kernel-headers -y

nvidia-smi || nvidia-driver-assistant --install --branch 590 --module-flavor closed
VERSION=$(awk -F= '/^VERSION_ID=/ {gsub("\"","",$2); print $2}' /etc/os-release 2>/dev/null || true)

sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel"${VERSION%%.*}"/"$(uname -m)"/cuda-rhel"${VERSION%%.*}".repo
sudo dnf install nvidia-driver-assistant -y
nvidia-smi || nvidia-driver-assistant --install --branch "$DRIVER_VER" --module-flavor closed
;;
*)
echo "Please run on a Rocky or Ubuntu system" >&2
exit 1
;;
esac
(echo "Rebooting machine to load Nvidia Driver" && sudo reboot)
Loading