Jupyter Notebook in IDAS

On this page:


Introduction

The following interfaces are available in IDAS:

  • JupyterLab - available in all IDAS instances (Python, R, RStudio, and Julia)

  • Jupyter Notebook - available in all IDAS instances (Python, R, RStudio, and Julia)

  • RStudio - only available in the R and RStudio instances

Research users can quickly switch between JupyterLab, Jupyter Notebook, and RStudio by changing the URL in their web browser. For more information, please see:Accessing IDAS for Research Use | Switching between JupyterLab, Jupyter Notebook, and RStudio.

For class users, the interfaces that are available will depend on the programming language requested by the instructor of the class.

This article outlines a few common tasks using Jupyter Notebook in IDAS. For more information about Jupyter Notebook, please see the official website for Project Jupyter: Project Jupyter

 

image-20240820-233451.png
Jupyter Notebook interface in IDAS

 

JupyterLab (not Jupyter Notebook) is the default interface for the Python, R, and Julia images in IDAS.

RStudio is the default interface for the RStudio images in IDAS.

We’re retaining the information about using Jupyter Notebook in IDAS for users who are using Jupyter Notebook instead of JupyterLab. However, we’re encouraging users to use the default JupyterLab in IDAS.

Uploading files

  • You can upload your own Jupyter notebooks and data files to IDAS. After creating an IDAS instance for research or class use, in the top right corner of the Jupyter Notebook interface, click Upload.

  • Select the files to upload in your local computer. Once the upload is done, you should see the uploaded files in your directory. 

Creating a new Jupyter notebook

  • First, create an IDAS instance with Python, R, or Julia. If you are a student in a class that uses IDAS, follow the instructions here to access your class instance.

  • In the top right corner of the Jupyter Notebook interface, click New.

  • Under Notebook, choose Python, R, or Julia in order to create a notebook in that language. For example, if you had created an instance with Python, you can create a new Jupyter notebook with Python:

Managing Jupyter notebooks

  • In the Jupyter Notebook interface, check the box next to a Jupyter notebook. If the notebook is not currently running, you will have the option to duplicate, rename, move, download, view, edit, or delete that notebook.

  • If the notebook is currently running, you will have the options to duplicate, shutdown, view, edit, or delete that notebook.

  • Below is a summary of these options:

    • Duplicate: will make a copy of the notebook, stored in the same folder.

    • Rename: will rename the notebook. Enter the new name in the pop-up box, then click Rename.

    • Move: will move the notebook to a location of your choice. In the pop-up box, enter the new directory path, then click Move.

    • Download: will download a copy of the notebook to your local computer.

    • View: will open the notebook and allow editing the notebook, including adding cells and running codes.

    • Edit: will allow editing the source code in the notebook.

    • Shutdown: will shut down a notebook that is running.

    • Delete (the red trash can icon): will permanently delete the notebook.

     

The path for your IDAS home directory is /home/HawkID. In the example below, the notebook will be moved to the demo folder inside your IDAS home directory.

 

Creating new files and folders

  • In the top right corner of the Jupyter Notebook interface, click New.

  • Choose Text File to create a new .txt file, or Folder to create a new Folder. The text file can later be renamed to another extension, such as .py.

Managing files and folders

File options

  • In the Jupyter Notebook interface, check the box next to a file. You will be able to see the options available for that file:

 

 

  • Below is a summary of the options for a .txt file:

    • Duplicate: will make a copy of the file, stored in the same folder.

    • Rename: will rename the file. Enter the new name in the pop-up box, then click Rename.

    • Move: will move the file to a destination of your choice. In the pop-up box, enter the destination directory path, then click Move.

    • Download: will download a copy of the file to your local computer.

    • View: will open the file for viewing only. No editing.

    • Edit: will allow editing the file.

    • Delete (the red trash can icon): will permanently delete the file.

Folder options

  • In the Jupyter Notebook interface, check the box next to a folder. You will have the option to rename, move, or delete that folder.

 

 

  • To rename a folder, check the box next to that folder, click Rename, enter the new folder name in the pop-up box, and click Rename:


  • To move a folder, check the box next to that folder, click Move, enter a new directory path in the pop-up box, and click Move. In the example below, the folder will be moved to the "demo" folder inside your IDAS home directory.


     

  • To delete a folder, check the box next to that folder, and then click the red trash can icon. You will be asked to confirm that you want to permanently delete the folder. Click Delete to confirm the action.

     

Working with Terminal in IDAS

The Terminal allows you to perform more tasks in IDAS, including checking system information, managing files and folders, and installing packages. Below are a few common tasks that may be helpful in IDAS.

Creating a new Terminal session

 

Checking information using Terminal

The following commands can be typed after the prompt symbol $ in Terminal:

  • pwd: prints the current working directory. If you are in your IDAS home directory, the directory will be /home/HawkID.

  • ls -a: lists the files and directories in your current directory. The -a option lists all files, including hidden files that start with ., such as .bashrc.

  • cd <destination>: change directory to a destination directory. For example,

    • cd demo: changes to the demo directory

    • cd: (with no argument) returns to your home directory 

  • jupyter notebook --version: prints the version of Jupyter Notebook. Similarly,  you can type python --version or conda --version.

Contact

If you have any questions or comments, please contact research-computing@uiowa.edu.