Attention

This documentation is under active development, meaning that it can change over time as we refine it. Please email help@massive.org.au if you require assistance.

Using the JupyterLab Application in Strudel2#

The JupyterLab application page has a range of information that can assist with your usage. The page is divided into sections. The top section is where you choose the parameters for your session. Select how long you want to use JupyterLab for, remembering that other researchers are also sharing the infrastructure and that at the end of the time your session will close down. The second section displays information about your running or soon to be running Jupyter session. The final section is for historical data, which includes your CPU and memory usage, important for helping you decide what resources are necessary. The Python installation has a number of pre-installed modules and is a controlled version. For the list of installed Python modules see section “Installed Package List”.

The JupyterLab application is intended for Python code development and interactive use. For long running and computationally intensive code we would request that you submit batch jobs for efficient use of the compute resources. Inactive sessions are not stopped, they continue consuming resources until manually stopped or the session time is exceeded.

Before starting a session you need to consider your request which has a number of user defined characteristics:

  • Session time (walltime) - How long are you going to work on your code/analysis for this session?

  • Tasks - How many CPUs have you designed your program to use? Is your code threaded and can take advantage of more than one core?

  • Mem - How much memory does your analysis need?

  • GPUs - What type of GPU have you designed your code/analysis to work with?

If you need assistance with configuration options please contact the helpdesk and one of the team can assist. In the example here we have selected a 1 hour session with 4G of memory.

To start a session, set your parameters and click “Launch” at which point the display will change and there will be a new line in the “PENDING/RUNNING JUPYTER LABS” section. The new line will show information about your request. In the “Time” column there will be an estimated start time for the session or that the job scheduler (Slurm) is finding a node on which to run the desktop for you with the message “Job is scheduling”.

../../../_images/jupyter-lab.png

Once JupyterLab is ready for your use the status line in “PENDING/RUNNING JUPYTER LABS” will change to include some extra buttons, “Connect” and “View log”. Select “Connect” and a new tab will open in your browser. If for some reason the connection fails, select view log and forward that information along with your username and the JobID to the helpdesk for assistance.

../../../_images/jupyter-lab-running.png

Once you select the Python kernel that you want to run, a new notebook will open if it is the first time you have used JupyterLab. On subsequent connections and sessions your previously opened notebooks will be open and ready for your use. The default file path when your session starts is your home folder, and future sessions will usually open with the file path you last had open.

../../../_images/notebook.png

In addition to the notebooks there are other useful features such as the terminal, file viewers and text file editors. If you know of a JupyterLab feature that you use and value let us know and we can explore how to support it.

Frequently Asked Questions#

Q. When I click connect, a new tab doesn’t open?

Your web broswer blocked the application from opening a new tab. Normally there is also an error message at the bottom of the screen to alert you.

../../../_images/failed-tab.png

You can change the settings for your browser to allow the popup. For Google Chrome the settings are in the location bar: select to always allow from the domain.

../../../_images/pop-up-settings.png

Q. JupyterLab says “Directory not found” but my files are still there when I check?

../../../_images/directory-not-found.png

Your web session has timed out and disconnected from the server. To resolve this close the tab and reconnect to the session. If the connect button is no longer available your session has reached the walltime limit and stopped.

Q. XX module is missing/outdated from this Python. How do I get it installed/updated?

There are different options that you can take:

  • Install to the “user site” location in your home folder by running: pip install --user package_name in a terminal. You will need to restart the python kernel to see the newly installed modules;

  • Install to the “user site” location in your home folder by running: !pip install --user package_name in a notebook. This command will run the external program in the notebook;

  • Create a virtual environment with your necessary configuration and use the custom virtual environment version of JupyterLab;

  • Create a conda environment with your necessary configuration and use the custom virtual environment version of JupyterLab.

Installed Package List#

You can view the installed packages from withing the Jupyter notebook by executing the command:

!pip list installed

The current list of Python modules is:

Package

Version

attrs

19.3.0

backcall

0.1.0

bleach

3.1.4

bokeh

2.0.2

bokeh-plot

0.1.5

certifi

2020.4.5.1

chardet

3.0.4

decorator

4.4.2

defusedxml

0.6.0

entrypoints

0.3

idna

2.9

importlib-metadata

1.6.0

ipykernel

5.2.1

ipython

7.13.0

ipython-genutils

0.2.0

ipywidgets

7.5.1

jedi

0.17.0

Jinja2

2.11.2

json5

0.9.4

jsonschema

3.2.0

jupyter-bokeh

2.0.1

jupyter-client

6.1.3

jupyter-core

4.6.3

jupyterlab

2.1.1

jupyterlab-server

1.1.1

MarkupSafe

1.1.1

mistune

0.8.4

nbconvert

5.6.1

nbformat

5.0.6

notebook

6.0.3

numpy

1.18.3

packaging

20.3

pandas

1.0.3

pandocfilters

1.4.2

parso

0.7.0

pexpect

4.8.0

pickleshare

0.7.5

Pillow

7.1.2

pip

9.0.1

pkg-resources

0.0.0

prometheus-client

0.7.1

prompt-toolkit

3.0.5

ptyprocess

0.6.0

Pygments

2.6.1

pyparsing

2.4.7

pyrsistent

0.16.0

python-dateutil

2.8.1

pytz

2020.1

PyYAML

5.3.1

pyzmq

19.0.0

requests

2.23.0

scipy

1.4.1

Send2Trash

1.5.0

setuptools

39.0.1

six

1.14.0

terminado

0.8.3

testpath

0.4.4

tornado

6.0.4

traitlets

4.3.3

typing-extensions

3.7.4.2

urllib3

1.25.9

wcwidth

0.1.9

webencodings

0.5.1

widgetsnbextension

3.5.1

zipp

3.1.0