Skip to content

installationAdvanced

Joshua J. Cogliati edited this page Sep 8, 2017 · 10 revisions

This page is for when the recommended methods of installation do not work. Miniconda or PIP can be used to install the raven libraries and hints for using them are below. Easybuild has also been used, but is only recommended if you are already using Easybuild for other software.

Miniconda

Miniconda can be directly installed using the instructions at the Miniconda website. Conda may need to be told about web proxies. For INL users, how to do this is explained at INL-proxy. Once Miniconda is installed, you can install RAVEN library dependencies as follows:

conda install numpy=1.11.0 h5py=2.6.0 scipy=0.17.1 scikit-learn=0.17.1 matplotlib=1.5.1 python=2.7 hdf5 swig pylint lxml

To get the newest instead the following command can be used (Warning: new versions may not yet be supported):

conda install numpy h5py scipy scikit-learn matplotlib hdf5 swig pylint lxml

Miniconda allows extra environments, with specified versions. To create one for RAVEN the following command can be used:

conda create --name raven_libraries -y numpy=1.11.0 h5py=2.6.0 scipy=0.17.1 scikit-learn=0.17.1 matplotlib=1.5.1 python=2.7 hdf5 swig pylint lxml

This command is actually generated by running the following command in the raven directory:

python scripts/TestHarness/testers/RavenUtils.py --conda-create

The environment can then be activated by:

source activate raven_libraries

and deactivated by:

source deactivate 

Installing with pip

The following install instructions can be used to install with PIP

Setting up directories

BASE_DIR="$HOME/raven_libs"
INSTALL_DIR="$BASE_DIR/install"
VE_DIR="$BASE_DIR/ve"
mkdir -p $BASE_DIR
cd $BASE_DIR

Install swig

wget https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
tar -xvzf swig-3.0.12.tar.gz
cd swig-3.0.12/
./configure --prefix="$INSTALL_DIR"
make
make install
export PATH="$INSTALL_DIR/bin:$PATH"

Installing virtualenv

cd
pip install --upgrade --target="$INSTALL_DIR" virtualenv

Installing other libraries in a virtual environment using pip

python "$INSTALL_DIR"/virtualenv.py "$VE_DIR"
source "$VE_DIR/bin/activate"
pip install numpy==1.11.0 h5py==2.6.0 scipy==0.17.1 scikit-learn==0.17.1 matplotlib==1.5.1

Run with the Virtual Environment

BASE_DIR="$HOME/raven_libs"
INSTALL_DIR="$BASE_DIR/install"
VE_DIR="$BASE_DIR/ve"
export PATH="$INSTALL_DIR/bin:$PATH"
source "$VE_DIR/bin/activate"

Example complete compile

This will probably need to be customized for different cluster, but these were used on one CentOS 7.2 cluster in 2017:

BASE_DIR="/opt/raven_libs"
INSTALL_DIR="$BASE_DIR/install"
VE_DIR="$BASE_DIR/ve"
mkdir -p $BASE_DIR
cd $BASE_DIR
wget https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
tar -xvzf swig-3.0.12.tar.gz
cd swig-3.0.12/
./configure --prefix="$INSTALL_DIR"
make
make install
export PATH="$INSTALL_DIR/bin:$PATH"

cd $BASE_DIR
wget http://prdownloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz
tar -xvzf tcl8.6.6-src.tar.gz
cd tcl8.6.6/unix
./configure --prefix="$INSTALL_DIR"
make
make test
make install

cd $BASE_DIR
wget http://prdownloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz
tar -xvzf tk8.6.6-src.tar.gz
cd tk8.6.6/unix/
./configure --prefix="$INSTALL_DIR"
make
make install

export LD_LIBRARY_PATH="$INSTALL_DIR"/lib:"$LD_LIBRARY_PATH"

cd $BASE_DIR
wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
tar -xvzf Python-2.7.13.tgz
cd Python-2.7.13/
./configure --prefix="$INSTALL_DIR"
make -j16
make install

cd
pip install --upgrade --target="$INSTALL_DIR" virtualenv
python "$INSTALL_DIR"/virtualenv.py "$VE_DIR"
source "$VE_DIR/bin/activate"
pip install numpy==1.11.0 h5py==2.6.0 scipy==0.17.1 scikit-learn==0.17.1
pip install matplotlib

#Commands to run each time.

BASE_DIR="/opt/raven_libs"
INSTALL_DIR="$BASE_DIR/install"
VE_DIR="$BASE_DIR/ve"
export PATH="$INSTALL_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$INSTALL_DIR"/lib:"$LD_LIBRARY_PATH"
source "$VE_DIR/bin/activate"