Deactivating and Activating a Notebook Session

Activate a deactivated Data Science notebook session or deactivate an active one.

About Deactivating Notebook Sessions

Before you deactivate a notebook session, save your work to its attached block volume to retain the data. Any data on the boot volume of the notebook session is deleted after you deactivate it.

When you deactivate a notebook session, the underlying Compute instance stops and, the attached block volume is detached and preserved. The block volume drive is mounted in /home/datascience so any data, notebooks, and conda environments that you save are stored there. The work you save in the block volume drive is retained after a notebook session is deactivated. When a notebook session is reactivated, you can access the work that you saved in the block volume.

About Activating Notebook Sessions

When you activate a notebook session, any saved data or files on the block volume of that deactivated notebook session are available in the activated notebook session.

Caution

When activating a notebook session, you can use only a VCN and subnet that let the reactivated notebook session remain in the same availability domain. If you use an availability-domain-specific subnet that would change the availability domain of the notebook session, then the activation action fails because the block volume reattachment fails. We recommend that you use regional subnets to avoid this type of error.

While activating a notebook session, you can change the following:

  • Compute shape
  • Block volume size
  • VCN
  • Subnet
  • Storage mounts
  • Runtime configuration's custom environment variables and Git repository URLs to clone
Note

  • The network configuration of a notebook session can't be changed when the notebook session is reactivated. If a notebook session was configured to use a default network, you can't deactivate the notebook session then select custom networking when you reactivate it.
  • If you change the block volume size, then you must specify a larger value than the current block volume size.

Steps

    1. On the Projects list page, select the project that contains the notebook sessions that you want to work with. If you need help finding the list page or the project, see Listing Projects.
    2. On the project details page, select Notebook sessions.
      All notebook sessions in the selected project are displayed in a table.
    3. Find the notebook session that you want to work with.
    4. From the Actions menu (three dots), select the relevant option.
      • Activate

        When you activate, you can change the Compute shape, block storage size, or runtime configuration.

      • Deactivate
    The notebook session is updated to the new state and shows Updating until it's completed.
  • Use the oci data-science notebook-session activate command and required parameters to activate a notebook session.

    oci data-science notebook-session activate --notebook-session-id <notebook-session-id> .-c [<text>].. [OPTIONS]

    Use the oci data-science notebook-session deactivate command and required parameters to deactivate a notebook session.

    oci data-science notebook-session deactivate --notebook-session-id <notebook-session-id> .-c [<text>].. [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Use the ActivateNotebookSession and DeactivateNotebookSession operations to activate or deactivate a notebook session.