Skip to content

Instantly share code, notes, and snippets.

@quarbby
Last active September 30, 2015 03:23
Show Gist options
  • Save quarbby/0cf35cc2b864759a071e to your computer and use it in GitHub Desktop.
Save quarbby/0cf35cc2b864759a071e to your computer and use it in GitHub Desktop.
Installing Numerical Computing Stack on Compute Cluster. Includes Numpy, SciPy, Pandas, Matplotlib, Sklearn
#!/usr/bin/sh
# Recommended to run this as sudo
mkdir setup
cd setup
echo 'Installing Numpy.....'
wget http://nchc.dl.sourceforge.net/project/numpy/NumPy/1.9.2/numpy-1.9.2.tar.gz
tar -zxvf numpy-1.9.2.tar.gz
cd numpy-1.9.2
python setup.py install --user
cd ..
echo 'Installing SetupTools.....'
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-18.3.2.tar.gz#md5=d30c969065bd384266e411c446a86623
tar -zxvf setuptools-18.3.2.tar.gz
cd setuptools-18.3.2
python setup.py install --user
cd ..
echo 'Installing dateutils....'
wget http://labix.org/download/python-dateutil/python-dateutil-1.5.tar.gz
tar -zxvf python-dateutil-1.5.tar.gz
cd python-dateutil-1.5
python setup.py install --user
cd ..
echo 'Installing pandas....'
wget https://pypi.python.org/packages/source/p/pandas/pandas-0.16.2.tar.gz\#md5\=a92787bcdf0fc0c6d5f4fe4877335ab5
tar -zxvf pandas-0.16.2.tar.gz
cd pandas-0.16.2
python setup.py install --user
cd ..
echo 'Installing matplotlib....'
wget https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.3/matplotlib-1.4.3.tar.gz
tar -zxvf matplotlib-1.4.3.tar.gz
cd matplotlib-1.4.3
python setup.py install --user
cd ..
'''
echo 'Installing ATLAS....'
wget http://sourceforge.net/projects/math-atlas/files/Stable/3.10.2/atlas3.10.2.tar.bz2
tar -jxvf atlas3.10.2.tar.bz2
cd ATLAS
mkdir ATLAS_build
cd ATLAS_build
echo 'Turning off CPU Throttling'
sudo /usr/bin/cpufreq-selector -g performance
echo 'Building Lapack...'
wget http://www.netlib.org/lapack/lapack-3.5.0.tgz
tar zxvf lapack-3.5.0.tgz
cd lapack-3.5.0
cp INSTALL/make.inc.gfortran make.inc
# Change code in make.inc
# OPTS = -02 -fPIC
# NOOPT = -O0 -fPIC
cd SRC
make
cd ..
../configure -b 64 -Fa alg -fPIC --with-netlib-lapack-tarfile=lapack-3.5.0.tgz
make
cd lib
make shared
make ptshared
cd ../..
'''
echo 'Installing OpenBLAS....'
git clone git://github.com/xianyi/OpenBLAS
cd OpenBLAS && make FC=gfortran
sudo make PREFIX=/opt/OpenBLAS install
echo "export LD_LIBRARY_PATH=/opt/OpenBLAS/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
cd ..
sudo ldconfig
cd ..
echo 'Installing SciPy....'
wget http://sourceforge.net/projects/scipy/files/scipy/0.16.0/scipy-0.16.0.tar.gz
tar -zxvf scipy-0.16.0.tar.gz
cd scipy-0.16.0
python setup.py install --user
cd ..
echo 'Installing Scikit-learn...'
wget https://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.16.1.tar.gz\#md5\=363ddda501e3b6b61726aa40b8dbdb7ecd
tar -zxvf scikit-learn-0.16.1.tar.gz
python setup.py install --user
cd ..
echo 'Cleaning up.....'
cd ..
rm -rf setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment