Skip to content

Instantly share code, notes, and snippets.

@neerajvashistha
Created March 13, 2020 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neerajvashistha/fc16f5e98db5cee0b740365cdc0f8951 to your computer and use it in GitHub Desktop.
Save neerajvashistha/fc16f5e98db5cee0b740365cdc0f8951 to your computer and use it in GitHub Desktop.
#https://www.osc.edu/resources/getting_started/howto/howto_locally_installing_software
mkdir -p $HOME/local/src $HOME/local/share/lmodfiles
cd $HOME/local/src
wget https://github.com/git/git/archive/v2.9.0.tar.gz
tar zxvf v2.9.0.tar.gz
cd git-2.9.0
autoconf # this creates the configure file
./configure --prefix=$HOME/local/git/2.9.0 CC=icc CFLAGS=-static-intel
make && make install
1. Lua module
you should create the directory $HOME/local/share/lmodfiles/git and create a module file within that directory named 2.9.0.lua
filename = 2.9.0.lua
```
-- Local Variables
local name = "git"
local version = "2.9.0"
-- Locate Home Directory
local homedir = os.getenv("HOME")
local root = pathJoin(homedir, "local", name, version)
-- Set Basic Paths
prepend_path("PATH", pathJoin(root, "bin"))
prepend_path("MANPATH", pathJoin(root, "share/man"))
```
2. Tcl module
python example below, you should create the directory $HOME/local/share/lmodfiles/git and create a module file within that directory named 2.9.0.tcl
filename = 3.6.9.nv304
#%Module
#
# Module Python 3.6.9.nv304
proc ModulesHelp { } {
global python_version
puts stderr "\tSets the environment for Python $python_version"
puts stderr "\n"
puts stderr "\tProduct information:\thttps://www.python.org/downloads/release/python-366/"
}
set python_version 3.6.9.nv304
set python_root /homes/nv304/local/Python/3.6.9
module-whatis "Sets the environment for Python $python_version"
conflict python
prepend-path PYTHONPATH $python_root/lib/python3.6/site-packages
prepend-path PATH $python_root/bin
prepend-path LD_LIBRARY_PATH $python_root/lib
module use $HOME/local/share/lmodfiles
module load Python/3.6.9.nv304
which python3
# ~/local/Python/3.6.9/bin/python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment