From 7bd42b2e2bd64447d75c82eb6605b36d0b1fa585 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Tue, 5 Nov 2024 12:34:59 +0100 Subject: [PATCH] zprofile: Add CUDA related paths Normally added by /etc/profile.d/cuda.sh and sourced by /etc/prodile. TODO: Should I source /etc/profile.d/* from one of /etc/zsh/zprofile and $ZDOTDIR/.zprofile? --- .config/zsh/.zprofile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 5c7bde9..aec0595 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -60,6 +60,22 @@ fi export ZETTELKASTEN_NOTES="$HOME/docs/notes" +# Cuda +if [[ -d /opt/cuda/bin && ! $PATH =~ /opt/cuda/bin ]]; then + export PATH="${PATH:+$PATH:}/opt/cuda/bin" +fi +if [[ -d /opt/cuda/nsight_compute && ! $PATH =~ /opt/cuda/nsight_compute ]]; then + export PATH="${PATH:+$PATH:}/opt/cuda/nsight_compute" +fi +if [[ -d /opt/cuda/nsight_systems/bin && ! $PATH =~ /opt/cuda/nsight_systems/bin ]]; then + export PATH="${PATH:+$PATH:}/opt/cuda/nsight_systems/bin" +fi +export CUDA_PATH=/opt/cuda +# Set the default host compiler for nvcc. This will need to be switched back +# and forth between the latest and previous GCC version, whatever nvcc +# currently supports. +export NVCC_CCBIN='/usr/bin/g++-13' + # Locale settings as $LANG [[ ! -e "$XDG_CONFIG_HOME/locale.conf" ]] || . "$XDG_CONFIG_HOME/locale.conf"