From e90569d830b2e9c11a2e24a7ea497bd266bcdc17 Mon Sep 17 00:00:00 2001 From: smbanx Date: Fri, 25 Oct 2024 17:52:36 -0700 Subject: [PATCH 01/12] add bash script to automatically install dependencies --- CUDA_install.json | 41 +++++++++++++++ helios_dependencies.sh | 111 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 CUDA_install.json create mode 100644 helios_dependencies.sh diff --git a/CUDA_install.json b/CUDA_install.json new file mode 100644 index 000000000..b08193c5c --- /dev/null +++ b/CUDA_install.json @@ -0,0 +1,41 @@ +{ + "WSL" : [ + "wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin", + "sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-wsl-ubuntu-12-6-local_12.6.2-1_amd64.deb", + "sudo dpkg -i cuda-repo-wsl-ubuntu-12-6-local_12.6.2-1_amd64.deb", + "sudo cp /var/cuda-repo-wsl-ubuntu-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "sudo apt-get update", + "sudo apt-get -y install cuda-toolkit-12-6" + ], + "Ubuntu_24.04" : [ + "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin", + "sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2404-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo dpkg -i cuda-repo-ubuntu2404-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo cp /var/cuda-repo-ubuntu2404-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "sudo apt-get update", + "sudo apt-get -y install cuda-toolkit-12-6", + "sudo apt-get install -y nvidia-open" + ], + "Ubuntu_22.04" : [ + "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin", + "sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2204-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo dpkg -i cuda-repo-ubuntu2204-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo cp /var/cuda-repo-ubuntu2204-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "sudo apt-get update", + "sudo apt-get -y install cuda-toolkit-12-6", + "sudo apt-get install -y nvidia-open" + ], + "Ubuntu_20.04" : [ + "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin", + "sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo dpkg -i cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "sudo cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "sudo apt-get update", + "sudo apt-get -y install cuda-toolkit-12-6", + "sudo apt-get install -y nvidia-open" + ] +} \ No newline at end of file diff --git a/helios_dependencies.sh b/helios_dependencies.sh new file mode 100644 index 000000000..c23c29fdb --- /dev/null +++ b/helios_dependencies.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash + +DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq") # Universal PATH dependencies + +# Define function to run command and clear output from terminal after completion +run_command_clear_output() { + run_command="$1" + out_file=$(mktemp) + # Install package and store output to temporary file + eval "$run_command" 2>&1 | tee "$out_file" + # Clear output from terminal + num_lines=$(wc -l < "$out_file") + for ((i=0; i /dev/null; then + echo "$package already installed at: $(command -v $package)" + else + echo "Installing $package..." + run_command_clear_output "$PACKAGE_MANAGER install $FLAG $package" + echo "$package installed at: $(command -v $package)" + fi +done + +# Install visualizer dependencies +for package in "${DEPENDENCIES_VIS[@]}"; do + if eval "$CHECK_EXISTS \"$package\" &> /dev/null"; then + echo "$package already installed." + else + echo "Installing $package..." + run_command_clear_output "$PACKAGE_MANAGER install $FLAG $package" + echo "$package installed." + fi +done + +# If host is macOS, dependencies installed successfully. +if [[ "$OSTYPE" == "darwin"* ]]; then + echo "Finished installing dependencies." + exit 0 +fi + +# Get Linux distribution & version +os_name=$(cat /etc/os-release | grep "^NAME=" | cut -d '"' -f 2) +version_id=$(cat /etc/os-release | grep "^VERSION_ID=" | cut -d '"' -f 2) +distro="${os_name}_${version_id}" +if cat /proc/version | grep -o WSL &> /dev/null; then + if cat /proc/version | grep -o WSL2 &> /dev/null; then + distro="WSL" + else + echo "Install the latest version of WSL2 for running Linux GUI applications!" + exit 1 + fi +fi + +# If host is Linux, need to install CUDA +if command -v nvcc &> /dev/null; then + echo "CUDA version $( nvcc --version | grep -oP 'V\d+\.\d+\.\d+' | awk -F'V' '{print $2}' ) already installed at $(command -v nvcc)" +else + echo "Installing CUDA..." + mapfile -t CUDA_COMMANDS < <(jq -r ".\"$distro\"[]" CUDA_install.json) + + # Verify that CUDA_COMMANDS were loaded correctly + if [ ${#CUDA_COMMANDS[@]} -eq 0 ]; then + echo "Can't install CUDA" + exit 1 + fi + + # Install CUDA + for install_command in "${CUDA_COMMANDS[@]}"; do + run_command_clear_output "$install_command" + done + + # Add nvcc to path + export PATH=/usr/local/cuda/bin:$PATH +fi + +echo "Finished installing dependencies." +exit 0 From 5d50c0925213300eede8eb1d4c5fdc219d151543 Mon Sep 17 00:00:00 2001 From: smbanx Date: Sat, 26 Oct 2024 23:10:55 -0700 Subject: [PATCH 02/12] improved helios_dependencies.sh; add command line arguments --- CUDA_install.json | 141 ++++++++++++++++++++++++++++++++-------- helios_dependencies.sh | 142 ++++++++++++++++++++++++++++++++--------- 2 files changed, 227 insertions(+), 56 deletions(-) diff --git a/CUDA_install.json b/CUDA_install.json index b08193c5c..ee4815fe1 100644 --- a/CUDA_install.json +++ b/CUDA_install.json @@ -1,41 +1,130 @@ { "WSL" : [ "wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin", - "sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600", "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-wsl-ubuntu-12-6-local_12.6.2-1_amd64.deb", - "sudo dpkg -i cuda-repo-wsl-ubuntu-12-6-local_12.6.2-1_amd64.deb", - "sudo cp /var/cuda-repo-wsl-ubuntu-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", - "sudo apt-get update", - "sudo apt-get -y install cuda-toolkit-12-6" + "dpkg -i cuda-repo-wsl-ubuntu-12-6-local_12.6.2-1_amd64.deb", + "cp /var/cuda-repo-wsl-ubuntu-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6" ], - "Ubuntu_24.04" : [ + "Ubuntu_24.04_x86_64" : [ "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin", - "sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600", "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2404-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo dpkg -i cuda-repo-ubuntu2404-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo cp /var/cuda-repo-ubuntu2404-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", - "sudo apt-get update", - "sudo apt-get -y install cuda-toolkit-12-6", - "sudo apt-get install -y nvidia-open" + "dpkg -i cuda-repo-ubuntu2404-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "cp /var/cuda-repo-ubuntu2404-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6", + "apt-get install -y nvidia-open" ], - "Ubuntu_22.04" : [ + "Ubuntu_22.04_x86_64" : [ "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin", - "sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600", "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2204-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo dpkg -i cuda-repo-ubuntu2204-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo cp /var/cuda-repo-ubuntu2204-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", - "sudo apt-get update", - "sudo apt-get -y install cuda-toolkit-12-6", - "sudo apt-get install -y nvidia-open" + "dpkg -i cuda-repo-ubuntu2204-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "cp /var/cuda-repo-ubuntu2204-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6", + "apt-get install -y nvidia-open" ], - "Ubuntu_20.04" : [ + "Ubuntu_20.04_x86_64" : [ "wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin", - "sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600", + "mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600", "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo dpkg -i cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb", - "sudo cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", - "sudo apt-get update", - "sudo apt-get -y install cuda-toolkit-12-6", - "sudo apt-get install -y nvidia-open" + "dpkg -i cuda-repo-ubuntu2004-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "cp /var/cuda-repo-ubuntu2004-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6", + "apt-get install -y nvidia-open" + ], + "SLES_15_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-sles15-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-sles15-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "zypper refresh", + "zypper install -y cuda-toolkit-12-6", + "zypper install -y nvidia-open" + ], + "Rocky_8_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-rhel8-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-rhel8-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "Rocky_9_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-rhel9-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-rhel9-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "RHEL_8_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-rhel8-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-rhel8-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "RHEL_9_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-rhel9-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-rhel9-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "OpenSUSE_15_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-opensuse15-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-opensuse15-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "zypper refresh", + "zypper install -y cuda-toolkit-12-6", + "zypper install -y nvidia-open" + ], + "KylinOS_10_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-kylin10-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-kylin10-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "Fedora_39_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-fedora39-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-fedora39-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" + ], + "Debian_11_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-debian11-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "dpkg -i cuda-repo-debian11-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "cp /var/cuda-repo-debian11-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "add-apt-repository contrib", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6", + "apt-get install -y nvidia-open" + ], + "Debian_12_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-debian12-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "dpkg -i cuda-repo-debian12-12-6-local_12.6.2-560.35.03-1_amd64.deb", + "cp /var/cuda-repo-debian12-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/", + "add-apt-repository contrib", + "apt-get update", + "apt-get -y install cuda-toolkit-12-6", + "apt-get install -y nvidia-open" + ], + "Azure-Linux_2_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-cm2-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-cm2-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "tdnf -y install mariner-repos-extended", + "tdnf clean all", + "tdnf -y install cuda-toolkit-12-6", + "tdnf -y install nvidia-open" + ], + "Amazon-Linux_2023_x86_64" : [ + "wget https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda-repo-amzn2023-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "rpm -i cuda-repo-amzn2023-12-6-local-12.6.2_560.35.03-1.x86_64.rpm", + "dnf clean all", + "dnf -y install cuda-toolkit-12-6", + "dnf -y module install nvidia-driver:open-dkms" ] } \ No newline at end of file diff --git a/helios_dependencies.sh b/helios_dependencies.sh index c23c29fdb..628a8c984 100644 --- a/helios_dependencies.sh +++ b/helios_dependencies.sh @@ -1,6 +1,20 @@ #!/usr/bin/env bash -DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq") # Universal PATH dependencies +# +# base: GCC, G++, and CMake are required to run Helios. +# vis: X11/xorg are required to use Visualizer plugin. +# cuda: CUDA is required for 1. Radiation, 2. Energy Balance, 3. LiDAR, 4. Aerial LiDAR, and 5. Voxel Intersection plugins. +# all: install all possible dependencies + +DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq") # Base PATH dependencies + +# Run bash script as root +if command -v nvcc &> /dev/null; then + ROOT="sudo" +else + echo "'sudo' command not found. Please run this script as root." + ROOT="" +fi # Define function to run command and clear output from terminal after completion run_command_clear_output() { @@ -18,22 +32,81 @@ run_command_clear_output() { rm "$out_file" } +# Define function to check if element is in a list +is_in_list() { + search="$1" + shift + list=("$@") + for element in "${list[@]}"; do + if [[ "$element" == "$search" ]]; then + return 0 + fi + done + return 1 +} + +arg=$(echo "$1" | tr '[:upper:]' '[:lower:]') # case-insensitive command-line argument + +ARGS=("base" "vis" "cuda" "all") # valid arguments; default is 'all' + +# Determine packages to install (base, vis, cuda, or all) +if [ -z "$1" ]; then + MODE="all" +else + if is_in_list "$arg" "${ARGS[@]}"; then + MODE="$arg" + else + MODE="all" + fi +fi + # Check if the host is Windows, macOS, or Linux if [[ "$(uname -s)" == *"MINGW"* || "$(uname -s)" == *"CYGWIN"* ]]; then - echo "Host is Windows." - echo -e "Please install \e]8;;https://visualstudio.microsoft.com/downloads/\aVisual Studio\e]8;;\a and \e]8;;https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64\aCUDA\e]8;;\a." + echo -e "Host is Windows. Dependencies need to be installed manually." + echo -e "Please install Visual Studio: https://visualstudio.microsoft.com/downloads/" + echo -e "Please install CUDA: https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64" exit 0 elif [[ "$OSTYPE" == "darwin"* ]]; then - echo "Host is macOS." + echo -e "Installing $MODE dependencies for macOS host...\n" PACKAGE_MANAGER="brew" - DEPENDENCIES_VIS=("Caskroom" "xquartz" "cuda") # required for visualizer + radiation + if [[ "$MODE" == "all" || "$MODE" == "cuda" || "$MODE" == "vis" ]]; then + DEPENDENCIES_PATH+=("Caskroom" "cask") + fi + if [[ "$MODE" == "all" || "$MODE" == "vis" ]]; then + DEPENDENCIES_PATH+=("xquartz") + fi + if [[ "$MODE" == "all" || "$MODE" == "cuda" ]]; then + DEPENDENCIES_PATH+=("cuda") + fi CHECK_EXISTS="brew list" FLAG="" elif [[ "$OSTYPE" == "linux-gnu"* ]]; then - echo "Host is Linux." - PACKAGE_MANAGER="sudo apt-get" - DEPENDENCIES_VIS=("libx11-dev" "xorg-dev" "libgl1-mesa-dev" "libglu1-mesa-dev" "libxrandr-dev") # required for visualizer - CHECK_EXISTS="dpkg -l | grep -w -m 1" + echo -e "Installing $MODE dependencies for Linux host...\n" + if command -v apt &> /dev/null; then + PACKAGE_MANAGER="$ROOT apt-get" + CHECK_EXISTS="dpkg -l | grep -w -m 1" + elif command -v yum &> /dev/null; then + PACKAGE_MANAGER="$ROOT yum" + CHECK_EXISTS="rpm -qa | grep -w -m 1" + elif command -v dnf &> /dev/null; then + PACKAGE_MANAGER="$ROOT dnf" + CHECK_EXISTS="rpm -qa | grep -w -m 1" + elif command -v tdnf &> /dev/null; then + PACKAGE_MANAGER="$ROOT tdnf" + CHECK_EXISTS="rpm -qa | grep -w -m 1" + elif command -v zypper &> /dev/null; then + PACKAGE_MANAGER="$ROOT zypper" + CHECK_EXISTS="zypper se --installed-only | grep -w -m 1" + elif command -v pacman &> /dev/null; then + PACKAGE_MANAGER="$ROOT pacman" + CHECK_EXISTS="pacman -Qs | grep -w -m 1" + else + echo "No package manager detected. Exiting." + exit 1 + fi + if [[ "$MODE" == "all" || "$MODE" == "vis" ]]; then + DEPENDENCIES_PATH+=("libx11-dev" "xorg-dev" "libgl1-mesa-dev" "libglu1-mesa-dev" "libxrandr-dev") + fi FLAG="-y" export DEBIAN_FRONTEND=noninteractive # Avoid timezone prompts else @@ -48,34 +121,30 @@ run_command_clear_output "$PACKAGE_MANAGER update $FLAG" for package in "${DEPENDENCIES_PATH[@]}"; do if command -v "$package" &> /dev/null; then echo "$package already installed at: $(command -v $package)" - else - echo "Installing $package..." - run_command_clear_output "$PACKAGE_MANAGER install $FLAG $package" - echo "$package installed at: $(command -v $package)" - fi -done - -# Install visualizer dependencies -for package in "${DEPENDENCIES_VIS[@]}"; do - if eval "$CHECK_EXISTS \"$package\" &> /dev/null"; then + elif eval "$CHECK_EXISTS \"$package\" &> /dev/null"; then echo "$package already installed." else echo "Installing $package..." run_command_clear_output "$PACKAGE_MANAGER install $FLAG $package" - echo "$package installed." + if command -v "$package" &> /dev/null; then + echo "$package installed at: $(command -v $package)" + else + echo "$package installed." + fi fi done -# If host is macOS, dependencies installed successfully. -if [[ "$OSTYPE" == "darwin"* ]]; then +# If host is macOS or host is Linux and CUDA not needed, dependencies already installed successfully. +if [[ "$OSTYPE" == "darwin"* || "$MODE" == "base" || "$MODE" == "vis" ]]; then echo "Finished installing dependencies." exit 0 fi # Get Linux distribution & version -os_name=$(cat /etc/os-release | grep "^NAME=" | cut -d '"' -f 2) +os_name=$(cat /etc/os-release | grep "^NAME=" | cut -d '"' -f 2 | awk '{print $1}') version_id=$(cat /etc/os-release | grep "^VERSION_ID=" | cut -d '"' -f 2) -distro="${os_name}_${version_id}" +architecture=$(uname -m) +distro="${os_name}_${version_id}_${architecture}" if cat /proc/version | grep -o WSL &> /dev/null; then if cat /proc/version | grep -o WSL2 &> /dev/null; then distro="WSL" @@ -89,23 +158,36 @@ fi if command -v nvcc &> /dev/null; then echo "CUDA version $( nvcc --version | grep -oP 'V\d+\.\d+\.\d+' | awk -F'V' '{print $2}' ) already installed at $(command -v nvcc)" else - echo "Installing CUDA..." + echo "Installing CUDA for $distro..." mapfile -t CUDA_COMMANDS < <(jq -r ".\"$distro\"[]" CUDA_install.json) # Verify that CUDA_COMMANDS were loaded correctly if [ ${#CUDA_COMMANDS[@]} -eq 0 ]; then - echo "Can't install CUDA" + echo "Error: No CUDA installation for $distro found in CUDA_install.json. Exiting..." exit 1 fi # Install CUDA for install_command in "${CUDA_COMMANDS[@]}"; do - run_command_clear_output "$install_command" + run_command_clear_output "$ROOT $install_command" done +fi + +# Add nvcc to path +export PATH=/usr/local/cuda/bin:$PATH - # Add nvcc to path - export PATH=/usr/local/cuda/bin:$PATH +# Fix OptiX drivers for WSL +if [[ "$distro" == "WSL" ]]; then + LXSS="/mnt/c/Windows/System32/lxss/lib/" + DRIVERS=("libnvoptix.so.1" "libnvidia-ptxjitcompiler.so.1") + if [[ ! -f "$LXSS/libnvidia-ptxjitcompiler.so.1" || ! -f "$LXSS/libnvoptix.so.1" ]]; then + mkdir -p "$LXSS" + eval "$ROOT cp -r plugins/radiation/optix_drivers/* $LXSS" + ln -s "$LXSS"libnvidia-ptxjitcompiler.so.470.256.02 "$LXSS"libnvidia-ptxjitcompiler.so.1 + ln -s "$LXSS"libnvoptix.so.470.256.02 "$LXSS"libnvoptix.so.1 + export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH + fi fi -echo "Finished installing dependencies." +echo "Finished installing $MODE dependencies." exit 0 From 074cd7f3ec414a0ff1a9e5a862bbec284f16f157 Mon Sep 17 00:00:00 2001 From: smbanx Date: Sun, 27 Oct 2024 02:31:00 -0700 Subject: [PATCH 03/12] track OptiX drivers with LFS --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..f84f1a7e4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +plugins/radiation/optix_drivers/* filter=lfs diff=lfs merge=lfs -text From 20bd0d83451846a5f69399a7f5e2aab2efc4daf1 Mon Sep 17 00:00:00 2001 From: smbanx Date: Sun, 27 Oct 2024 02:37:39 -0700 Subject: [PATCH 04/12] added WSL OptiX Drivers --- .../optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 | 3 +++ .../optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 | 3 +++ .../optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 | 3 +++ plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 | 3 +++ plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 | 3 +++ plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 | 3 +++ plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 | 3 +++ plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 | 3 +++ plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 | 3 +++ 9 files changed, 27 insertions(+) create mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 create mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 create mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 create mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 create mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 create mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 create mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 create mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 create mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 new file mode 100644 index 000000000..27d67cdc1 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d78b5af512c2d488c1633660f22715f0022518592479fa74e8e6c30142e20463 +size 11160664 diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 new file mode 100644 index 000000000..841fe1062 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c00591a2cc40ba4a562f9d88936e975cbbce6d3b1e3bf19e1c03f3dd3d84a62 +size 28674464 diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 new file mode 100644 index 000000000..a835ef524 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5aa3a018a4d1923c677da25eedf0f6cf5d096a5e3f2e8d35529ee85502261b00 +size 33311344 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 new file mode 100644 index 000000000..150ff4075 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:040b85cdf7062fd52bdeb31a0e0110003db613754d8c53208fa35e3e8cb6c639 +size 82671032 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 new file mode 100644 index 000000000..83e4f80fc --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd457515c04b79619875395ecfc4d11d3ff7b7df4eb4ebb6d9467d52b38a6267 +size 76336528 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 new file mode 100644 index 000000000..402b515f0 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7df82c7d736ed6b0de586a58b61cffe27ff641d80a215858bde29de79c398aca +size 70181104 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 b/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 new file mode 100644 index 000000000..3540a4266 --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:153e015b00e30d29f1e590fe007d5b742699df6105a5bece6df29656932fca8f +size 168406696 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 b/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 new file mode 100644 index 000000000..6a2f9deac --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed7bbb2ea059aab3af88055ec029717880f6072882caa6c8ad06e1d6305d953a +size 59927784 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 b/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 new file mode 100644 index 000000000..a07953efa --- /dev/null +++ b/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6ba7db29c180908d94ba4a38654f29f87cf416ac2013f0d9b98b44c004dbf51 +size 92437024 From 116b7fa29b6938d5235e5c1312921f7d1c0849ae Mon Sep 17 00:00:00 2001 From: smbanx Date: Wed, 30 Oct 2024 17:29:25 -0700 Subject: [PATCH 05/12] rename and improve dependencies script; fix ambiguous wait call --- helios_dependencies.sh => dependencies.sh | 43 ++++++++++++++----- .../src/SyntheticAnnotation.cpp | 2 +- 2 files changed, 34 insertions(+), 11 deletions(-) rename helios_dependencies.sh => dependencies.sh (81%) diff --git a/helios_dependencies.sh b/dependencies.sh similarity index 81% rename from helios_dependencies.sh rename to dependencies.sh index 628a8c984..433107827 100644 --- a/helios_dependencies.sh +++ b/dependencies.sh @@ -1,10 +1,32 @@ #!/usr/bin/env bash +################################################ +## Install package dependencies for Helios. ## # -# base: GCC, G++, and CMake are required to run Helios. -# vis: X11/xorg are required to use Visualizer plugin. -# cuda: CUDA is required for 1. Radiation, 2. Energy Balance, 3. LiDAR, 4. Aerial LiDAR, and 5. Voxel Intersection plugins. -# all: install all possible dependencies +## Use one of the following arguments to choose +## which dependencies to install. Default (if +## no argument provided) is "all". +# +# ARGUMENT +# option: Choice of which dependencies to +# install (default is "all"). +# See below. +# +# OPTIONS +# BASE: Install GCC, G++, and CMake +# Required to run Helios. +# VIS: Install base dependencies + X11/xorg +# Required for Visualizer plugin. +# CUDA: Install base dependencies + CUDA +# Required for 1. Radiation, 2. Energy +# Balance, 3. LiDAR, 4. Aerial LiDAR, +# and 5. Voxel Intersection plugins. +# ALL: Install dependencies for ALL plugins +# +# EXAMPLE +# source dependencies.sh BASE +# +################################################ DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq") # Base PATH dependencies @@ -16,7 +38,7 @@ else ROOT="" fi -# Define function to run command and clear output from terminal after completion +# Runs command and clears output from terminal after completion. run_command_clear_output() { run_command="$1" out_file=$(mktemp) @@ -32,7 +54,7 @@ run_command_clear_output() { rm "$out_file" } -# Define function to check if element is in a list +# Checks if element is in a list is_in_list() { search="$1" shift @@ -101,7 +123,7 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then PACKAGE_MANAGER="$ROOT pacman" CHECK_EXISTS="pacman -Qs | grep -w -m 1" else - echo "No package manager detected. Exiting." + echo "No package manager detected. Exiting..." exit 1 fi if [[ "$MODE" == "all" || "$MODE" == "vis" ]]; then @@ -179,12 +201,13 @@ export PATH=/usr/local/cuda/bin:$PATH # Fix OptiX drivers for WSL if [[ "$distro" == "WSL" ]]; then LXSS="/mnt/c/Windows/System32/lxss/lib/" + OPTIX_DRIVERS_PATH="/plugins/radiation/optix_drivers/" DRIVERS=("libnvoptix.so.1" "libnvidia-ptxjitcompiler.so.1") if [[ ! -f "$LXSS/libnvidia-ptxjitcompiler.so.1" || ! -f "$LXSS/libnvoptix.so.1" ]]; then mkdir -p "$LXSS" - eval "$ROOT cp -r plugins/radiation/optix_drivers/* $LXSS" - ln -s "$LXSS"libnvidia-ptxjitcompiler.so.470.256.02 "$LXSS"libnvidia-ptxjitcompiler.so.1 - ln -s "$LXSS"libnvoptix.so.470.256.02 "$LXSS"libnvoptix.so.1 + ln -s "$OPTIX_DRIVERS_PATH/libnvidia-rtcore.so.470.256.02" "$LXSS/libnvidia-rtcore.so.470.256.02" + ln -s "$OPTIX_DRIVERS_PATH/libnvidia-ptxjitcompiler.so.470.256.02" "$LXSS/libnvidia-ptxjitcompiler.so.1" + ln -s "$OPTIX_DRIVERS_PATH/libnvoptix.so.470.256.02" "$LXSS/libnvoptix.so.1" export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH fi fi diff --git a/plugins/syntheticannotation/src/SyntheticAnnotation.cpp b/plugins/syntheticannotation/src/SyntheticAnnotation.cpp index 012112902..87898c5ac 100644 --- a/plugins/syntheticannotation/src/SyntheticAnnotation.cpp +++ b/plugins/syntheticannotation/src/SyntheticAnnotation.cpp @@ -317,7 +317,7 @@ void SyntheticAnnotation::render( const char* outputdir ) { vis_RGB.plotUpdate( true ); - wait(5); + helios::wait(5); outfile.clear(); outfile.str(""); From 1ddeae9bb1d3c999a81449faef89045cac1b8fb9 Mon Sep 17 00:00:00 2001 From: smbanx Date: Thu, 14 Nov 2024 00:38:47 -0800 Subject: [PATCH 06/12] removed proprietary optix drivers; changed dependencies.sh accordingly --- dependencies.sh | 23 ++++++++++++++----- .../libnvidia-ptxjitcompiler.so.470.256.02 | 3 --- .../libnvidia-ptxjitcompiler.so.550.127.05 | 3 --- .../libnvidia-ptxjitcompiler.so.560.35.03 | 3 --- .../libnvidia-rtcore.so.470.256.02 | 3 --- .../libnvidia-rtcore.so.550.127.05 | 3 --- .../libnvidia-rtcore.so.560.35.03 | 3 --- .../optix_drivers/libnvoptix.so.470.256.02 | 3 --- .../optix_drivers/libnvoptix.so.550.127.05 | 3 --- .../optix_drivers/libnvoptix.so.560.35.03 | 3 --- 10 files changed, 17 insertions(+), 33 deletions(-) delete mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 delete mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 delete mode 100644 plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 delete mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 delete mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 delete mode 100644 plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 delete mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 delete mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 delete mode 100644 plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 diff --git a/dependencies.sh b/dependencies.sh index 433107827..379cfef17 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -28,7 +28,7 @@ # ################################################ -DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq") # Base PATH dependencies +DEPENDENCIES_PATH=("gcc" "g++" "cmake" "wget" "jq" "pybind11") # Base PATH dependencies # Run bash script as root if command -v nvcc &> /dev/null; then @@ -127,7 +127,7 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then exit 1 fi if [[ "$MODE" == "all" || "$MODE" == "vis" ]]; then - DEPENDENCIES_PATH+=("libx11-dev" "xorg-dev" "libgl1-mesa-dev" "libglu1-mesa-dev" "libxrandr-dev") + DEPENDENCIES_PATH+=("libx11-dev" "xorg-dev" "libgl1-mesa-dev" "libglu1-mesa-dev" "libxrandr-dev" "python3-dev") fi FLAG="-y" export DEBIAN_FRONTEND=noninteractive # Avoid timezone prompts @@ -200,14 +200,25 @@ export PATH=/usr/local/cuda/bin:$PATH # Fix OptiX drivers for WSL if [[ "$distro" == "WSL" ]]; then + LINUX_DRIVER=$(find . -name "NVIDIA-Linux-x86_64-*.run" -print -quit) + if [[ -n "$LINUX_DRIVER" ]]; then + VERSION=$(echo "$LINUX_DRIVER" | sed -E 's/.*NVIDIA-Linux-x86_64-([0-9.]+)\.run/\1/') + echo "Linux Driver Version $VERSION Found. Installing..." + run_command_clear_output "./$LINUX_DRIVER -x" + LINUX_DRIVER_PATH="${LINUX_DRIVER%.run}" + else + echo "Linux Driver not found. Please place Linux Driver .run file in Helios root directory and rerun this script." + echo -e "Linux drivers can be downloaded \e]8;;https://www.nvidia.com/en-in/drivers/unix/\aHERE\e]8;;\a. Version \e]8;;https://www.nvidia.in/Download/driverResults.aspx/227064/en-in\a470.256.02\e]8;;\a (https://www.nvidia.in/Download/driverResults.aspx/227064/en-in) recommended." + exit 1 + fi LXSS="/mnt/c/Windows/System32/lxss/lib/" - OPTIX_DRIVERS_PATH="/plugins/radiation/optix_drivers/" + OPTIX_DRIVERS_PATH="$(pwd)/$LINUX_DRIVER_PATH/" DRIVERS=("libnvoptix.so.1" "libnvidia-ptxjitcompiler.so.1") if [[ ! -f "$LXSS/libnvidia-ptxjitcompiler.so.1" || ! -f "$LXSS/libnvoptix.so.1" ]]; then mkdir -p "$LXSS" - ln -s "$OPTIX_DRIVERS_PATH/libnvidia-rtcore.so.470.256.02" "$LXSS/libnvidia-rtcore.so.470.256.02" - ln -s "$OPTIX_DRIVERS_PATH/libnvidia-ptxjitcompiler.so.470.256.02" "$LXSS/libnvidia-ptxjitcompiler.so.1" - ln -s "$OPTIX_DRIVERS_PATH/libnvoptix.so.470.256.02" "$LXSS/libnvoptix.so.1" + ln -s "$OPTIX_DRIVERS_PATH/libnvidia-rtcore.so.$VERSION" "$LXSS/libnvidia-rtcore.so.$VERSION" + ln -s "$OPTIX_DRIVERS_PATH/libnvidia-ptxjitcompiler.so.$VERSION" "$LXSS/libnvidia-ptxjitcompiler.so.1" + ln -s "$OPTIX_DRIVERS_PATH/libnvoptix.so.$VERSION" "$LXSS/libnvoptix.so.1" export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH fi fi diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 deleted file mode 100644 index 27d67cdc1..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.470.256.02 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d78b5af512c2d488c1633660f22715f0022518592479fa74e8e6c30142e20463 -size 11160664 diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 deleted file mode 100644 index 841fe1062..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.550.127.05 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c00591a2cc40ba4a562f9d88936e975cbbce6d3b1e3bf19e1c03f3dd3d84a62 -size 28674464 diff --git a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 b/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 deleted file mode 100644 index a835ef524..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-ptxjitcompiler.so.560.35.03 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5aa3a018a4d1923c677da25eedf0f6cf5d096a5e3f2e8d35529ee85502261b00 -size 33311344 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 deleted file mode 100644 index 150ff4075..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.470.256.02 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:040b85cdf7062fd52bdeb31a0e0110003db613754d8c53208fa35e3e8cb6c639 -size 82671032 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 deleted file mode 100644 index 83e4f80fc..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.550.127.05 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd457515c04b79619875395ecfc4d11d3ff7b7df4eb4ebb6d9467d52b38a6267 -size 76336528 diff --git a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 b/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 deleted file mode 100644 index 402b515f0..000000000 --- a/plugins/radiation/optix_drivers/libnvidia-rtcore.so.560.35.03 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7df82c7d736ed6b0de586a58b61cffe27ff641d80a215858bde29de79c398aca -size 70181104 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 b/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 deleted file mode 100644 index 3540a4266..000000000 --- a/plugins/radiation/optix_drivers/libnvoptix.so.470.256.02 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:153e015b00e30d29f1e590fe007d5b742699df6105a5bece6df29656932fca8f -size 168406696 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 b/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 deleted file mode 100644 index 6a2f9deac..000000000 --- a/plugins/radiation/optix_drivers/libnvoptix.so.550.127.05 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed7bbb2ea059aab3af88055ec029717880f6072882caa6c8ad06e1d6305d953a -size 59927784 diff --git a/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 b/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 deleted file mode 100644 index a07953efa..000000000 --- a/plugins/radiation/optix_drivers/libnvoptix.so.560.35.03 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d6ba7db29c180908d94ba4a38654f29f87cf416ac2013f0d9b98b44c004dbf51 -size 92437024 From 7eed68fd14eae89692b3a07892a47e19e5c398a1 Mon Sep 17 00:00:00 2001 From: smbanx Date: Thu, 14 Nov 2024 00:44:08 -0800 Subject: [PATCH 07/12] rebase onto master; minor changes --- CUDA_install.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CUDA_install.json b/CUDA_install.json index ee4815fe1..288cb0ab6 100644 --- a/CUDA_install.json +++ b/CUDA_install.json @@ -127,4 +127,4 @@ "dnf -y install cuda-toolkit-12-6", "dnf -y module install nvidia-driver:open-dkms" ] -} \ No newline at end of file +} From 967e3c4d8d420003419a8a313cf87780dbfaf541 Mon Sep 17 00:00:00 2001 From: smbanx Date: Thu, 14 Nov 2024 00:46:28 -0800 Subject: [PATCH 08/12] removed .gitattributes (no longer need for LFS) --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f84f1a7e4..000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -plugins/radiation/optix_drivers/* filter=lfs diff=lfs merge=lfs -text From c5d9e4fabe2a5d74ec1eee6c44d54792f96520e3 Mon Sep 17 00:00:00 2001 From: smbanx Date: Fri, 22 Nov 2024 12:53:51 -0800 Subject: [PATCH 09/12] removed cuda from macOS --- dependencies.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dependencies.sh b/dependencies.sh index 379cfef17..bab570704 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -98,7 +98,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then DEPENDENCIES_PATH+=("xquartz") fi if [[ "$MODE" == "all" || "$MODE" == "cuda" ]]; then - DEPENDENCIES_PATH+=("cuda") +# DEPENDENCIES_PATH+=("cuda") + echo "Host is macOS. CUDA cannot be installed." fi CHECK_EXISTS="brew list" FLAG="" From 606f595119434c112da500d9a6b65bb958bac430 Mon Sep 17 00:00:00 2001 From: smbanx Date: Fri, 22 Nov 2024 14:00:15 -0800 Subject: [PATCH 10/12] dependencies.sh automatically installs OptiX drivers for WSL; updated UserGuide.dox --- dependencies.sh | 5 +++++ doc/UserGuide.dox | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/dependencies.sh b/dependencies.sh index bab570704..fa5ac4252 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -201,6 +201,11 @@ export PATH=/usr/local/cuda/bin:$PATH # Fix OptiX drivers for WSL if [[ "$distro" == "WSL" ]]; then + # Automatically install Linux drivers version 470.256.02 + DRIVER_URL="https://us.download.nvidia.com/XFree86/Linux-x86_64/470.256.02/NVIDIA-Linux-x86_64-470.256.02.run" + DRIVER_FILE="NVIDIA-Linux-x86_64-470.256.02.run" + wget -O $DRIVER_FILE $DRIVER_URL + LINUX_DRIVER=$(find . -name "NVIDIA-Linux-x86_64-*.run" -print -quit) if [[ -n "$LINUX_DRIVER" ]]; then VERSION=$(echo "$LINUX_DRIVER" | sed -E 's/.*NVIDIA-Linux-x86_64-([0-9.]+)\.run/\1/') diff --git a/doc/UserGuide.dox b/doc/UserGuide.dox index 82e581e37..e784cd659 100755 --- a/doc/UserGuide.dox +++ b/doc/UserGuide.dox @@ -223,10 +223,26 @@ $ git pull 4. Double-click TdrDelay and add 600 for the Value data and make it a Decimal (instead of Hexadecimal). Click OK. If you encounter the same "Display driver stopped responding and has recovered" error in the future, increase the value. 5. Close the registry editor and restart the computer for the changes to take effect. + \subsubsection Automatically Installing Dependencies + + Running Helios requires several packages to be installed. To install all required packages for all plugins automatically, simply run the following source script with the argument "ALL" (or with no arguments): `source dependencies.sh` + + There are a few additional options for installing dependencies if it is not necessary to use all plugins. + + To install only the dependencies required to run Helios with no plugins (or plugins that require no packages), use the argument "BASE": `source dependencies.sh BASE` + + To install only the dependencies required to run Helios with the visualizer plugin, use the argument "VIS": `source dependencies.sh VIS` + + To install only the dependencies required to run Helios with CUDA (required for the Radiation, Energy Balance, LiDAR, Aerial LiDAR, and Voxel Intersection plugins), use the argument "CUDA": `source dependencies.sh CUDA` + + Note that this script only works for macOS and Linux operating systems. Windows users must install dependencies manually. Also note that CUDA is incompatible with macOS, and Mac users cannot run or install dependencies for the plugins that require CUDA. + \subsubsection OptiXWSL Manually installing OptiX if using Windows Subsystem for Linux (WSL) OptiX is normally packaged with Helios, such that you do not have to worry about installing it. However, if you are using Windows Subsystem for Linux (WSL), you will need to manually install OptiX since the version included with Helios does not have the required drivers for WSL. You can follow the instructions on this site to perform the installation: https://forums.developer.nvidia.com/t/problem-running-optix-7-6-in-wsl/239355/7. + Alternatively, simply run the dependencies script, which will automatically install Linux drivers version 470.256.02 and configure the drivers accordingly: `source dependencies.sh` + \section SetupLinux Set-up on Linux \subsection SetupLinuxCLion Setting up basic build functionality From 5d9ca02cd31c16dc795713ea26799e230bd9b460 Mon Sep 17 00:00:00 2001 From: smbanx Date: Fri, 22 Nov 2024 14:04:16 -0800 Subject: [PATCH 11/12] minor changes --- doc/UserGuide.dox | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/UserGuide.dox b/doc/UserGuide.dox index e784cd659..8ad335a2c 100755 --- a/doc/UserGuide.dox +++ b/doc/UserGuide.dox @@ -223,7 +223,7 @@ $ git pull 4. Double-click TdrDelay and add 600 for the Value data and make it a Decimal (instead of Hexadecimal). Click OK. If you encounter the same "Display driver stopped responding and has recovered" error in the future, increase the value. 5. Close the registry editor and restart the computer for the changes to take effect. - \subsubsection Automatically Installing Dependencies + \subsubsection Automatically Installing Helios Dependencies Running Helios requires several packages to be installed. To install all required packages for all plugins automatically, simply run the following source script with the argument "ALL" (or with no arguments): `source dependencies.sh` @@ -241,7 +241,9 @@ $ git pull OptiX is normally packaged with Helios, such that you do not have to worry about installing it. However, if you are using Windows Subsystem for Linux (WSL), you will need to manually install OptiX since the version included with Helios does not have the required drivers for WSL. You can follow the instructions on this site to perform the installation: https://forums.developer.nvidia.com/t/problem-running-optix-7-6-in-wsl/239355/7. - Alternatively, simply run the dependencies script, which will automatically install Linux drivers version 470.256.02 and configure the drivers accordingly: `source dependencies.sh` + Alternatively, simply run the dependencies script: `source dependencies.sh` + + This will automatically install and configure the Linux drivers (version 470.256.02) to run OptiX. \section SetupLinux Set-up on Linux From d0c7c46ac13336f1ba44ef8778ef276fab474db7 Mon Sep 17 00:00:00 2001 From: smbanx Date: Fri, 22 Nov 2024 14:06:49 -0800 Subject: [PATCH 12/12] minor typo --- doc/UserGuide.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/UserGuide.dox b/doc/UserGuide.dox index 8ad335a2c..471174cb3 100755 --- a/doc/UserGuide.dox +++ b/doc/UserGuide.dox @@ -225,7 +225,7 @@ $ git pull \subsubsection Automatically Installing Helios Dependencies - Running Helios requires several packages to be installed. To install all required packages for all plugins automatically, simply run the following source script with the argument "ALL" (or with no arguments): `source dependencies.sh` + Running Helios requires several packages to be installed. To install all required packages for all plugins automatically, simply run the following shell script with the argument "ALL" (or with no arguments): `source dependencies.sh` There are a few additional options for installing dependencies if it is not necessary to use all plugins.