Setting up EC2 Server on AWS

Server Information

Free tier (30 GB disk space, 1 GB ram) -- just a test, free. This has my Jupyter server on it (passwd: 'tony')

  • Certificate: seelvizTEST.pem (/Users/Tony/Downloads/)

Free tier (10 GB disk space, 1 GB ram) -- another test, free.

  • Certificate: anothertest.pem (/Users/Tony/Downloads/)

Seelviz Server (200 GB disk space, 52 GB RAM) -- 340 cents an hour, running under my Gmail, please shut down when not in use (don't wanna get charged!) This is on the GoogleCloud.

  • Public DNS: contact me.
  • Public IP: contact me.

AWS security groups:

HTTP: 80: Any (0.0.0.0) SSH: 22: Any CustomTCP:0-100:Any

In terminal after SSH

  • sudo apt-get update
  • sudo apt-get install
  • sudo apt-get install python-pip
  • sudo pip install jupyter notebook
  • sudo pip install enum
  • sudo pip install decorator
  • sudo pip install markupsafe
  • sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
  • sudo easy_install greenlet
  • sudo easy_install gevent
  • sudo easy_install ipython pyzmq tornado
  • sudo pip install jsonschema

NOW FOLLOW THIS: http://jupyter-notebook.readthedocs.io/en/latest/public_server.html, except do NOT do the SSL

(mycert.pem, mykey.pem) stuff

  • jupyter notebook --generate-config
  • ipython #[below is in ipython]
  • from notebook.auth import passwd
  • passwd()
  • ‘albert’ = ‘sha1:56d2d3ffe29b:2b680e567cdfbc083ac1e6a777f838b1d3b23731'
  • exit ## back in shell
  • cd
  • cd .jupyter/
  • vim jupyter_notebook_config.py ## add below to file
  • c.NotebookApp.ip = ‘*’
  • c.NotebookApp.open_browser = False
  • c.NotebookApp.password = ‘sha1:56d2d3ffe29b:2b680e567cdfbc083ac1e6a777f838b1d3b23731’
  • c.NotebookApp.port = 80 ## exit file
  • sudo jupyter notebook

In [ ]:
# In terminal:

# Check updates
sudo apt-get update

# Get Git
sudo apt-get install git

# Get C (for making stuff)
sudo apt-get install build-essential

# Get NDreg dependencies:
sudo apt-get -y install cmake python-numpy libinsighttoolkit4-dev libfftw3-dev

# Get ITKSnap so ndreg works
itkVersion=4.10.0
itkMinorVersion=`echo ${itkVersion} | cut -d'.' -f 1,2`
mkdir itk;
cd itk
wget https://sourceforge.net/projects/itk/files/itk/${itkMinorVersion}/InsightToolkit-${itkVersion}.tar.gz
tar -vxzf InsightToolkit-${itkVersion}.tar.gz
mv InsightToolkit-${itkVersion} src/
mkdir bin; cd bin
cmake -G "Unix Makefiles" -DITK_USE_SYSTEM_FFTW=OFF -DITK_USE_FFTWD=ON -DITK_USE_FFTWF=ON -DModule_ITKReview=ON ../src 
make && sudo make install

# Go back to home directory
cd

# Git clone ndreg
git clone https://github.com/neurodata/ndreg.git
    
# Go to ndreg
cd ndreg

# Install ndreg
cmake .
make && sudo make install