diff --git a/docs/installation.md b/docs/installation.md index c54f120..b49f007 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,19 +1,22 @@ ## Pre-Installation Instructions -### 1. **Set Up Ubuntu VM**: -- Start with an Ubuntu VM equipped with Nvidia GPUs. - -### 2. **Install Dependencies**: - - - **For Docker Benchmarks**: Install Docker, Nvidia Docker (for GPU support), git, Python with Virtual Environment, and Nvidia drivers. - - - **For Direct Machine Benchmarks**: Install Tmux, git, Python with Virtual Environment, and Nvidia drivers. - -### 3. **Setup VM With Script (requires git to clone repo)**: - - - **Docker Benchmarks**: Execute `./setup_vm_docker.sh` from the cloned Git repository. - - - **Direct Machine Benchmarks**: Execute `./setup_vm_tmux.sh` from the cloned Git repository. +1. Build a VM in OpenStack with: + - Image: `ubuntu-jammy-22.04-nogui` or `ubuntu-noble-24.04-nogui` + - Flavor: Any `g-*` flavor with an NVIDIA GPU + - Your key pair for SSH access + - Accessible networking: Internal or Private with FIP + +2. Use [this](https://www.nvidia.com/en-gb/drivers/) NVIDIA page to find the latest driver for your VMs GPU and note the number e.g. 590 + +3. Install Dependencies: + ```shell + git clone https://github.com/stfc/iris-bench.git + cd iris-bench + # For using Docker containers to benchmark: + ./setup_vm_docker.sh + # For direct machine benchmarking: + ./setup_vm_tmux.sh + ``` --- diff --git a/setup_vm_docker.sh b/setup_vm_docker.sh index 5d869e9..e4929ea 100755 --- a/setup_vm_docker.sh +++ b/setup_vm_docker.sh @@ -13,6 +13,14 @@ # software for IrisBench and Docker benchmarks. # ============================================================================= +# Get Nvidia driver version from first argument to script +NVIDIA_DRIVER_VERSION=$1 + +if [ -z "$NVIDIA_DRIVER_VERSION" ] ;then + echo "Please provide the Nvidia driver version. e.g. ./setup_vm_docker.sh " + exit +fi + ##### INSTALL OFFICAL DOCKER ##### @@ -82,7 +90,7 @@ echo -e "/n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/nINSTALL NVIDIA DRIVERS/n~~~~~~~~~~~~ # Install NVIDIA drivers (if needed) # Ensure the driver is up-to-date for the GPU to achieve maximum performance. -sudo apt install -y nvidia-driver-535 +sudo apt install -y "nvidia-driver-${NVIDIA_DRIVER_VERSION}" ##### REBOOT VM ##### diff --git a/setup_vm_tmux.sh b/setup_vm_tmux.sh index ed4b65a..b30b841 100755 --- a/setup_vm_tmux.sh +++ b/setup_vm_tmux.sh @@ -9,6 +9,14 @@ # Tmux, and NVIDIA drivers. # ============================================================================= +# Get Nvidia driver version from first argument to script +NVIDIA_DRIVER_VERSION=$1 + +if [ -z "$NVIDIA_DRIVER_VERSION" ] ;then + echo "Please provide the Nvidia driver version. e.g. ./setup_vm_tmux.sh " + exit +fi + #### INSTALL Git, python3-pip and Venv ### echo -e "/n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/nInstall git, python3-pip, and Venv/n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/n" @@ -33,7 +41,7 @@ echo -e "/n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/nINSTALL NVIDIA DRIVERS/n~~~~~~~~~~~~ # Install NVIDIA drivers (if needed) # Ensure the driver is up-to-date for the GPU to achieve maximum performance. -sudo apt install -y nvidia-driver-535 +sudo apt install -y "nvidia-driver-${NVIDIA_DRIVER_VERSION}" ##### REBOOT VM #####