Opening a Notebook Session

Notebook sessions open in JupyterLab to facilitate many tasks.

Note

You can open only a notebook session that's active.

  1. Use the Console to sign in to a tenancy with the necessary policies.
  2. Open the navigation menu and click Analytics & AI. Under Machine Learning, click Data Science.
  3. Select the compartment that contains the project with the notebook session.

    All projects in the compartment are listed.

  4. Click the name of the project.

    The project details page opens and lists the notebook sessions.

  5. Click the name of the notebook session.

    The notebook session details page opens.

  6. Click Open.

    The Jupyter Notebook web-based environment opens.

When you open a notebook session, the Launcher tab is open and contains the main actions.

Environment Explorer

Work with the various conda environments.

Notebook Examples

Learn how to use notebooks by opening a getting started or other task specific examples for installed conda environments.

If this option isn't displayed, then click the File menu, select New, and then select Notebook Explorer to choose a notebook.

Each example is loaded with a temporary file name that you can change by right-clicking the tab name and selecting Rename Notebook. Enter a new name, and then click Rename.

Python and Installed Conda Environments

Python and any installed conda environments are listed. You can create a notebook session or start a kernel console.

The Python 3 kernel is the conda environment that contains a minimal set of libraries, including oci, cx_oracle, and numpy. We recommend that you install or create more conda environments.

A new notebook opens and the first cell contains useful tips that are the same as when you create a notebook.

Other

You can open a terminal, create text or markdown files, or get help.

You can open a new Launcher tab by clicking the plus sign (+) in the File Browser.

Following are some tips for working with notebook sessions:

Git Extension

Get direct access to a Git repository by using the Git extension included in notebook sessions. If you see the Failed to load the jupyterlab-git server extension warning, that means an older version of Notebook Virtual Machine is being used so the Git extension isn't installed. You can click Dismiss to work in the notebook without issues. To start using the Git extension, deactivate and reactivate the notebook to get the extension.

Public Internet Access

Check for public internet access as follows:

import requests 
         response=requests.get("https://oracle.com") 
         assert response.status_code==200, "Internet connection failed"
Authentication

Set up the OCI configuration file and API key using Required Keys and OCIDs.

Environment Variables

Useful environment variables are as follows:

import os
                            
                            print(os.environ["NB_SESSION_COMPARTMENT_OCID"])
                            print(os.environ["PROJECT_OCID"])
                            print(os.environ["USER_OCID"])
                            print(os.environ["TENANCY_OCID"])
                            print(os.environ["NB_REGION"])