Skip to content
Open
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
10 changes: 7 additions & 3 deletions gpu_benchmark/gpu_setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 United Kingdom Research and Innovation
set -ex

sudo dnf update -y

Expand All @@ -13,6 +14,9 @@ sudo dracut --force

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
wget -nc https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run
nvidia-smi || sudo sh cuda_12.1.0_530.30.02_linux.run --silent
nvidia-smi || (echo "Rebooting machine to load Nvidia Driver" && sudo reboot)

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

nvidia-smi || sudo dnf module install nvidia-driver:580 -y
nvidia-smi || (echo "Rebooting machine to load Nvidia Driver" && sudo reboot)