4. Launch a Jupyter Lab in Open OnDemand

Download the workshop Jupyter notebook

If you haven’t already, please download participants-copy-2023.ipynb to your local computer (use “save as”, i.e. right click).

Review: Jupyter Lab as an Interactive Application in Open OnDemand

As we previously saw, Open OnDemand allows us to use interactive applications, one of which is Juypter Lab.

/Connect%20to%20cluster

The form is used to specify what resources you want, which are then placed into a queue with other waiting jobs and will start to run your job as soon as the resources requested are available.

Activity: Learn to start a session

Why use Jupyter?

For Python-based data science and machine learning applications, Jupyter notebook is a great platform because:

  1. You can store your data, code, do visualizations, equations, text, outputs all in one place,
  2. You can easily share your work easily in different formats like JSON, PDF, html,
  3. It supports more than 40 programming languages, can switch between differnt environments and has an interactive output,
  4. You can easily edit the code and re-run it without affecting other sections.

Jupyter Lab vs Jupyter Notebook

Jupyter notebook allows you to access ipython notebooks only (.ipynb files), i.e. it will create a computational environment which stores your code, results, plots, texts etc. And here you can work in only one of your environments.

Jupyter Lab gives a better user interface along with all the facilties provided by the notebook. It is a flexible, web based application with a modular structure where one can access python files (.py), ipython notebooks, html or markdown files, access file browser (to upload, download, copy, rename, delete files), work with multiple Jupyter notebooks and environments, all in the same window.

To use Jupyter Lab, You write your code or plain text in rectangular “cells” and the browser then passes it to the back-end “kernel”, which runs your code and returns output.