JupyterNotebook

From DISI
Jump to navigation Jump to search

Using Jupyter Notebooks

jupyter ports

Talk to Ben about getting a port range set up for you

Lab Member Port range
Matthew O'Meara 5040-5049


install dependencies

Install conda environment for python, typically I use


    conda create -n main anaconda
    source activate main

Start the notebook server

    # set the jupyter port (see above)
    JUPYTER_PORT=5048
    # on gimel in the bkslab cluster
    jupyter notebook --ip=0.0.0.0 --port=$JUPYTER_PORT
    # copy the token e.g. 'e0593317037148392cb9b0489a5f376ca950f3a14d37e371' to the clipboard

log in to the notebook server from a client

    # on a laptop outside the lab network
    JUPYTER_PORT=5048
    ssh -N -p 22 -D 1080 momeara@portal3.combpio.ucsf.edu -L $JUPYTER_PORT:gimel:$JUPYTER_PORT
    # open a web browser and navigate to localhost:JUPYTER_PORT/lab and enter the token

Tips

  • use localhost:JUPYTER_PORT/lab to get the JuypterLab interface, its much better but for some reason not the default yet