Monthly Archives: December 2014

Installing IPython notebook on della computing cluster

# Create local python site-packages folders

mkdir /home/
mkdir /home/
mkdir /home/
mkdir /home/

# tell python where to find these packages

echo 'export PYTHONPATH=$HOME/local/lib/python2.7/site-packages' >> ~/.bashrc
source ~/.bashrc

#python 2.7 is not default at della

module load python

# install packages needed for running the notebook

python -measy_install --prefix /home/ tornado
python -measy_install --prefix /home/ pyzmq
python -measy_install --prefix /home/ jinja2

echo 'export PATH=$HOME/local/lib/python2.6/site-packages:$PATH' >> ~/.bashrc
source ~/.bashrc

#create mycert.pem using the following openssl cmd:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

# my mycert.pem wherever you’d like

mv mycert.pem ~/local/lib/

# create an ipython profilename

ipython profile create profilename

# generate a password using the following ipython utility:

from IPython.lib import passwd
Enter password:
Verify password:

#copy this hashed pass

vi /home/

# edit:

c.NotebookApp.port = 1999 # change this port number to something not in use, I used 2999
c.NotebookApp.password = 'sha1:…' #use generated pass here
c.NotebookApp.certfile = u'/home/'
c.NotebookApp.open_browser = False
c.NotebookApp.ip = ''



# sign off and sign back on to della

ssh -A -L<Your Port #>:<Your Port #>
module load python

# boot up notebook

ipython notebook --ip= --pylab=inline  --profile=profilename --port <Your Port #>
# note that if you are trying to access Della
# from outside the Princeton CS department, you
# may have to forward the same port from your home computer
# to some princeton server, then again to Della

# In your browser go to<Your Port #>