Chris Villalta Ph.D.

Molecular Biologist and Bioinformatics Scientist with NGS experience


Leave a comment

Setting Up Jupyter Lab Server

I recently decided to try out the alpha version of Jupyter Lab the next step in the Ipython notebook. Below is a screenshot from the Jupyter blog post where Jupyter Lab was announced. I like that now files can be organized easily by date and there can be several windows and it reminds me of ipython notebook meeting pycharm.

jlab-screenshot-nb-con-term-2

There is a link to github where you can download the most up to date alpha version of Jupyter Lab (link here). The instruction on github were easy to follow.

I decided to set up an jupyter lab server using the step below, which I have used to set up ipython notebook servers in the past.

1. Create IPython profile (type command in unix shell)
ipython profile create
2. Activate SSL (type command in unix shell)
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -  out mycert.pem
3. Add notebook password to config file

Open ipython (type command in unix shell):

ipython

Enter commands below in ipython window:

from IPython.lib import passwd
passwd()

#enter a pw
#verify the  pw
#copy hash key to clipboard

4. Open emacs and make the following file (type command in unix window):
emacs ~/.ipython/profile_default/ipython_notebook_config.py

Input the following into emacs:

c = get_config()
c.NotebookApp.password = u’{paste clipboard a.k.a the hash key}'

5. Start IPython notebook using SSL
ipython notebook --ip='{input your ip address you are using}' --no-browser  --certfile=mycert.pem
6. Start IPython notebook from browser
"https://server/ipaddres:[assigned_port]"

Advertisements