Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jonescompneurolab/hnn
Browse files Browse the repository at this point in the history
  • Loading branch information
samnemo committed Oct 5, 2018
2 parents 1112116 + 6e0ef1d commit a5c936a
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 22 deletions.
57 changes: 37 additions & 20 deletions installer/centos/build.sh → installer/centos/centos6-installer.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# start with this since it gets input needed

# HNN repo from bitbucket
#git clone https://bitbucket.org/samnemo/hnn.git# old repo
# this whole script probably needs to be run with root permissions to avoid sudo timeouts

# start with this since it gets input needed
sudo yum -y install git
# HNN repo from github - moved to github on April 8, 2018
git clone https://github.com/jonescompneurolab/hnn.git

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -i epel-release-latest-7.noarch.rpm
sudo yum -y install python34-devel.x86_64
sudo yum -y install epel-release
sudo yum -y install python34-devel
sudo yum -y install gcc-c++
sudo yum -y install libX11-devel
sudo yum -y group install "Development Tools"
sudo yum -y groupinstall "Development tools"
sudo yum -y install xorg-x11-fonts-100dpi
sudo yum -y install Cython
sudo yum -y install python34-pip python-tools
sudo yum -y install python34-Cython
sudo yum -y install python34-setuptools
sudo easy_install-3.4 pip
sudo pip3 install matplotlib
# make sure matplotlib version 2 is used -- is this strictly needed?
sudo pip3 install --upgrade matplotlib
Expand All @@ -28,8 +28,8 @@ sudo PATH=$PATH:/usr/lib64/openmpi/bin pip3 install mpi4py
startdir=$(pwd)
echo $startdir

git clone https://github.com/nrnhines/nrn
git clone https://github.com/nrnhines/iv
git clone https://github.com/neuronsimulator/nrn
git clone https://github.com/neuronsimulator/iv
cd iv
git checkout d4bb059
./build.sh
Expand All @@ -39,7 +39,7 @@ sudo make install -j4
cd ../nrn
#git checkout be2997e
./build.sh
./configure --with-nrnpython=python3 --with-paranrn --disable-rx3d
./configure --with-nrnpython=python3 --with-paranrn
make -j4
sudo PATH=$PATH:/usr/lib64/openmpi/bin make install -j4
cd src/nrnpython
Expand All @@ -48,6 +48,10 @@ sudo python3 setup.py install
# move outside of nrn directories
cd $startdir

# cleanup the nrn and iv folders, since NEURON Has been installed
sudo rm -rf iv
sudo rm -rf nrn

# setup HNN itself
cd hnn
# make compiles the mod files
Expand All @@ -56,14 +60,31 @@ export PATH=$PATH:/usr/local/nrn/$CPU/bin
make
cd ..

# delete the installed hnn folder in the event that it already exists
sudo rm -rf /usr/local/hnn

# move the hnn folder to the programs directory
sudo mv hnn /usr/local

# make the program accessable via the terminal command 'hnn'
sudo ln -fs /usr/local/hnn/hnn /usr/local/bin/hnn

# create the global session variables, make available for all users
echo '# these lines define global session variables for HNN' | sudo tee -a /etc/profile.d/hnn.sh
echo 'export CPU=$(uname -m)' | sudo tee -a /etc/profile.d/hnn.sh
echo 'export PATH=$PATH::/usr/lib64/openmpi/bin:/usr/local/nrn/$CPU/bin' | sudo tee -a /etc/profile.d/hnn.sh

# qt, pyqt, and supporting packages - needed for GUI
# SIP unforutnately not available as a wheel for Python 3.4, so have to compile
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.2/sip-4.19.2.tar.gz
tar -zxf sip-4.19.2.tar.gz
cd sip-4.19.2
sudo python3 configure.py
make -j4
sudo make install -j4
cd ..
sudo rm -rf sip-4.19.2
rm -f sip-4.19.2.tar.gz

sudo yum -y install qt-devel
sudo yum -y install qt5-qtbase
Expand All @@ -76,18 +97,14 @@ python3 configure.py --qmake=/usr/lib64/qt5/bin/qmake --confirm-license
make -j4
sudo make install -j4
cd ..
rm -rf PyQt5_gpl-5.8.2
rm -f PyQt5_gpl-5.8.2.tar.gz

# used by pqtgraph - for visualization
sudo pip3 install PyOpenGL PyOpenGL_accelerate

# pyqtgraph - only used for visualization
cd hnn
git clone https://github.com/pyqtgraph/pyqtgraph.git
cd pyqtgraph
git checkout pyqt5
git pull
sudo python3 setup.py install
sudo pip3 install pyqtgraph

# needed for matplotlib
sudo yum -y install python34-tkinter

103 changes: 103 additions & 0 deletions installer/centos/centos7-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# start with this since it gets input needed
sudo yum -y install git
# HNN repo from github - moved to github on April 8, 2018
git clone https://github.com/jonescompneurolab/hnn.git

sudo yum -y install epel-release
sudo yum -y install python34-devel.x86_64
sudo yum -y install libX11-devel
sudo yum -y group install "Development Tools"
sudo yum -y install xorg-x11-fonts-100dpi
sudo yum -y install python34-Cython
sudo yum -y install python34-pip
# have to upgrade pip because the version provided by python34-pip
# does not check the installed Python version and will attempt to
# install modules that require newer versions of Python
sudo pip3 install --upgrade pip
sudo pip3 install matplotlib
# make sure matplotlib version 2 is used -- is this strictly needed?
sudo pip3 install --upgrade matplotlib
sudo pip3 install scipy
sudo yum -y install ncurses-devel
sudo yum -y install openmpi openmpi-devel
sudo yum -y install libXext libXext-devel
export PATH=$PATH:/usr/lib64/openmpi/bin
sudo PATH=$PATH:/usr/lib64/openmpi/bin pip3 install mpi4py

# save dir installing hnn to
startdir=$(pwd)
echo $startdir

git clone https://github.com/neuronsimulator/nrn
git clone https://github.com/neuronsimulator/iv
cd iv
git checkout d4bb059
./build.sh
./configure
make -j4
sudo make install -j4
cd ../nrn
#git checkout be2997e
./build.sh
./configure --with-nrnpython=python3 --with-paranrn
make -j4
sudo PATH=$PATH:/usr/lib64/openmpi/bin make install -j4
cd src/nrnpython
sudo python3 setup.py install

# move outside of nrn directories
cd $startdir

# cleanup the nrn and iv folders, since NEURON Has been installed
sudo rm -rf iv
sudo rm -rf nrn

# setup HNN itself
cd hnn
# make compiles the mod files
export CPU=$(uname -m)
export PATH=$PATH:/usr/local/nrn/$CPU/bin
make
cd ..

# delete the installed hnn folder in the event that it already exists
sudo rm -rf /usr/local/hnn

# move the hnn folder to the programs directory
sudo mv hnn /usr/local

# make the program accessable via the terminal command 'hnn'
sudo ln -fs /usr/local/hnn/hnn /usr/local/bin/hnn

# create the global session variables, make available for all users
echo '# these lines define global session variables for HNN' | sudo tee -a /etc/profile.d/hnn.sh
echo 'export CPU=$(uname -m)' | sudo tee -a /etc/profile.d/hnn.sh
echo 'export PATH=$PATH:/usr/lib64/openmpi/bin:/usr/local/nrn/$CPU/bin' | sudo tee -a /etc/profile.d/hnn.sh

# qt, pyqt, and supporting packages - needed for GUI
# SIP unforutnately not available as a wheel for Python 3.4, so have to compile
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.2/sip-4.19.2.tar.gz
tar -zxf sip-4.19.2.tar.gz
cd sip-4.19.2
sudo python3 configure.py
make -j4
sudo make install -j4
cd ..
sudo rm -rf sip-4.19.2
sudo rm -f sip-4.19.2.tar.gz

sudo yum -y install qt-devel
sudo yum -y install qt5-qtbase
sudo yum -y install qt5-qtbase-devel

# Have to use --no-deps to get it to install as no SIP wheel available for Python 3.4
sudo pip3 install pyqt5 --no-deps

# used by pqtgraph - for visualization
sudo pip3 install PyOpenGL PyOpenGL_accelerate

# pyqtgraph - only used for visualization
sudo pip3 install pyqtgraph

# needed for matplotlib
sudo yum -y install python34-tkinter
5 changes: 5 additions & 0 deletions installer/centos/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Note: this removes HNN itself but none of its dependencies

sudo rm -rf /usr/local/hnn
sudo rm -f /usr/local/bin/hnn
sudo rm -f /etc/profile.d/hnn.sh
4 changes: 2 additions & 2 deletions installer/ubuntu/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ sudo pip3 install --upgrade matplotlib
startdir=$(pwd)
echo $startdir

git clone https://github.com/nrnhines/nrn
git clone https://github.com/nrnhines/iv
git clone https://github.com/neuronsimulator/nrn
git clone https://github.com/neuronsimulator/iv
cd iv
git checkout d4bb059
./build.sh
Expand Down

0 comments on commit a5c936a

Please sign in to comment.