Jupyter Notebook should only be run on compute nodes through LSF as an interactive job, not on the login servers juno or lilac. You will be able to connect to it by setting up SSH tunnels. You will need to make sure that you have enabled SSH authentication forwarding as per Secure Shell SSH.

Information about submitting LSF jobs is at http://mskcchpc.org/display/CLUS/LSF+Primer.  Your interactive LSF job should request the resources your Jupyter notebook will need. These are the steps for starting and connecting to your jupiter-notebook on the cluster:

  1. Download miniconda and install Jupyter notebook with miniconda.
  2. Start an interactive session with bsub and start jupyter-notebook.
  3. Pay attention to the message showing on the screen once you start jupyter-notebook. It will tell you the actual node you are on, the port number and the URL.
  4. Set up SSH tunnels to the node running jupiter-notebook.
  5. Connect using the browser on your local machine.

Here is an example of a simple LSF interactive job submission:
username@lilac:~>bsub -n 2 -W 4:00 -R 'span[hosts=1] rusage[mem=8]' -Is /bin/bash

This example requests a GPU for NLP(natural language processing) on Lilac:
username@lilac:~> bsub -n 2 -W 2:00 -q gpuqueue -gpu "num=1" -R "span[hosts=1]" -Is /bin/bash

After you submit your interactive bsub, you will get a prompt on a compute node when one is available. The compute node name will be in the prompt.

start jupyter-notebook on the "node" you land on, not on lilac!!!

username@lt14:~> ./miniconda3/bin/jupyter-notebook --no-browser --port 9898

Pay attention to the url of the jupyter-notebook from the output and the compute node name in the prompt. You will need these to connect to it.

You can connect to jupyter-notebook by setting up a SSH tunnel. When you create a SSH tunnel, it associates a specific port on the remote system to one on the local system. SSH authentication forwarding must be configured for this to work. The basic command to create a SSH tunnel that passes through the login node to the compute node on your laptop or local server is:

"ssh -L<Port-A>:localhost:<Port-B> user@Host-B -t ssh -L<Port-B>:localhost:<Port-C> user@Host-C"

This example sets up SSH tunnels from your laptop through lilac to a compute node lt14 running jupyter–notebook on port 9898:

yourlaptop>ssh -L 9898:localhost:9898 lilac ssh -L 9898:localhost:9898 -N lt14 

Then open a Browser on your laptop. The exact url is in the output of the jupyter-notebook.

Here are some useful links you can read: