Skip to content

Instantly share code, notes, and snippets.

@yuna0x0
Created May 24, 2023 06:25
Show Gist options
  • Save yuna0x0/d4ad53132b0f3357f804bcb097a94a86 to your computer and use it in GitHub Desktop.
Save yuna0x0/d4ad53132b0f3357f804bcb097a94a86 to your computer and use it in GitHub Desktop.
CUDA 12.1 Linux (Modulefile)
#%Module1.0
# /usr/share/modules/modulefiles/cuda/12.1
proc ModulesHelp {} {
puts stderr "\t Adds NVIDIA CUDA Toolkit 12.1 to your environment variables,"
}
module-whatis "adds NVIDIA CUDA Toolkit 12.1 to your environment variables"
set version 12.1
set root /usr/local/cuda-$version
setenv CUDA_HOME $root
setenv CUDA_LIB $root/lib64
setenv CUDA_INCLUDE $root/include
prepend-path PATH $root/bin
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib64
prepend-path LIBRARY_PATH $root/lib64
prepend-path LD_LIBRARY_PATH $root/extras/CUPTI/lib64
prepend-path LIBRARY_PATH $root/extras/CUPTI/lib64
prepend-path MANPATH $root/doc/man
prepend-path PKG_CONFIG_PATH $root/pkgconfig
prepend-path MODULEPATH /usr/share/modules/modulefiles/cuda/$version
conflict cuda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment