The environment modules project is an ideal way to set up (albeit mostly manually) your environment for multiple packages. This is a quick guide on setting it up.
/usr/share/Modules/init/bash
(and optionally bash_completion
) to /etc/bashrc
instead of running /usr/share/Modules/bin/add.modules
, but if you only want it locally, that’s also an option./usr/share/Modules/modulefiles/cuda/8.0
:#%Module1.0
proc ModulesHelp { } {
global version prefix name
puts stderr "$name/$version - loads the environment for $name, in $prefix"
}
set name cuda
set version 8.0
module-whatis "loads the $name environment"
set prefix /usr/local/cuda-$version
prepend-path LD_LIBRARY_PATH $prefix/lib64
prepend-path PATH $prefix/bin
/usr/share/Modules/bin/createmodule.py /opt/root-6.08.02/bin/thisroot.sh > /usr/share/Modules/modulefiles/root/6.08.02