Last active
November 3, 2016 05:04
-
-
Save mickypaganini/9079fc3e53edb7d947f2ddd918ab9b2a to your computer and use it in GitHub Desktop.
Set up environment for HEP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ** TO USE ROOT, type load_root after all of this has been installed ** | |
# GENERAL SETUP | |
################ | |
# env usefulness | |
PYTHON_VERSION="2.7.10" | |
PY_PAYLOAD="Python-${PYTHON_VERSION}.tgz" | |
SOFTWARE_PATH=$HOME/software/install | |
module load Compilers/GCC/4.8.2 | |
# software will live at ~/software/install | |
mkdir -p ${SOFTWARE_PATH} | |
# INSTALL SQLITE | |
################# | |
cd ${SOFTWARE_PATH} | |
wget https://www.sqlite.org/2016/sqlite-autoconf-3150000.tar.gz | |
tar -xzvf sqlite-autoconf-3150000.tar.gz && cd ${SOFTWARE_PATH}/sqlite-autoconf-3150000 | |
./configure --prefix=${SOFTWARE_PATH} | |
make && make install | |
# INSTALL PYTHON | |
################ | |
cd ${SOFTWARE_PATH}/../ | |
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/${PY_PAYLOAD} | |
tar -xzvf ${PY_PAYLOAD} && cd Python-${PYTHON_VERSION} | |
LDFLAGS="-L${SOFTWARE_PATH}/lib" ./configure --enable-shared --prefix=${SOFTWARE_PATH} --enable-universalsdk | |
make && make install | |
# Install PIP | |
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --prefix=${SOFTWARE_PATH} | |
# install essential packages | |
pip install numpy scipy scikit-learn ipython pandas keras deepdish | |
# CONFIGURE YOUR PROFILE SETTINGS | |
################################## | |
# add the stuff you need to make this work to your ~/.bashrc | |
cat << 'EOF' >> ~/.bashrc | |
module load Compilers/GCC/4.8.2 | |
export SOFTWARE_PATH=$HOME/software/install | |
export PATH=${SOFTWARE_PATH}/bin:$PATH | |
export LD_LIBRARY_PATH=${SOFTWARE_PATH}/lib:$LD_LIBRARY_PATH | |
export LD_RUN_PATH=${SOFTWARE_PATH}/lib:$LD_RUN_PATH | |
export CPATH=${SOFTWARE_PATH}/include:$CPATH | |
alias load_root='setupATLAS --quiet && lsetup --quiet "root 5.34.25-x86_64-slc6-gcc48-opt"' | |
EOF | |
# INSTALL ROOT STUFF | |
#################### | |
# load all the path magic from before | |
source $HOME/.bashrc | |
# load ROOT! | |
load_root | |
# These need ROOT to be up and ready | |
pip install rootpy root_numpy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment