Created
February 6, 2018 01:02
-
-
Save elijahc/0a30b2702e59c81b259d6c93657cf41b to your computer and use it in GitHub Desktop.
Script for installing NEURON and python 2.7 on ec2
This file contains hidden or 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
# Install the relevant system requirements | |
sudo apt-get update | |
# Install Python 2.7 w/ development headers | |
sudo apt-get install -y python | |
sudo apt-get install -y python-dev | |
# Install NEURON deps | |
sudo apt-get install -y libx11-dev | |
sudo apt-get install -y libxext-dev | |
sudo apt-get install -y mpich | |
sudo apt-get install -y libncurses-dev | |
# Install Pip and update it | |
sudo apt-get install python-pip | |
pip install --upgrade pip | |
pip install mpi4pi | |
pip install neo | |
pip install numpy | |
pip install lazyarray | |
# Old way of installing python libraries | |
#sudo apt-get install -y python-numpy | |
#sudo apt-get install -y python-lazyarray | |
#sudo apt-get install -y python-neo | |
# Make neuron directory | |
mkdir ~/neuron | |
cd ~/neuron/ | |
# Fetch source files for NEURON 7.4 and InterView | |
wget http://www.neuron.yale.edu/ftp/neuron/versions/v7.4/nrn-7.4.tar.gz | |
wget http://www.neuron.yale.edu/ftp/neuron/versions/v7.4/iv-19.tar.gz | |
# Unzip neuron install packages | |
tar xzf ./iv-19.tar.gz | |
tar xzf ./nrn-7.4.tar.gz | |
# Rename folders for ease of use | |
mv iv-19 iv | |
mv nrn-7.4 nrn | |
# Configure, make and install InverViews | |
cd ./iv | |
./configure --prefix=`pwd` | |
make | |
make install | |
# Configure, make and install Neuron | |
cd ../nrn | |
./configure --prefix=`pwd` --with-nrnpython --with-paranrn --with-iv | |
make | |
make install | |
# Allow importing of neuron into python | |
cd src/nrnpython | |
sudo python setup.py install | |
# Add IV and NEURON to PATH | |
sudo echo "# Add Neuron and IV to path variable" >> ~/.bashrc | |
sudo echo 'export PATH="$HOME/neuron/nrn/x86_64/bin:$PATH"' >> ~/.bashrc | |
sudo echo 'export PATH="$HOME/neuron/iv/x86_64/bin:$PATH"' >> ~/.bashrc | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment