Exiting a Cloud Workstation Session

There are two mechanisms to exit a Cloud Workstation (CW) session - Hold and Shut Down. Both options sync new content created in the Cloud Workstation back to the Capsule. The primary difference lies in how they handle session preservation and installed packages.

Hold

  • Retains all installed packages and folders created during the session.

  • When you return to the session, you can resume working without reinstalling or recreating anything.

Shut Down

  • Does not preserve installed packages.

  • When the Cloud Workstation session is shutdown the system will display which packages were installed during the session and prompt you to add them to the Capsule's environment via the Package Managers.

    • If you want the packages available in the Cloud Workstation, you need to add them to the Capsule environment and rebuild the Capsule first.

Idleness Detection

After a period of idleness or low CPU (<5%) activity, the user will receive a UI notification asking if they wish to keep the session active. If there is no response, the Cloud Workstation will be placed on hold to prevent unnecessary resource consumption.

The idle period for the deployment is configured by the admin. By default, this time is 2 hours.

If the admin has enabled the option to extend idle time, users will see a gear icon in the top-right corner of the Cloud Workstation bar. Clicking the gear will open Cloud Workstation Settings, where users can choose to increase the session's idle time by the amount set by the admin.

circle-info

The idle time extension applies only to the current session. Once the session ends, the idle time will reset to the default value.

Hold and Resume a Cloud Workstation

When exiting a Cloud Workstation via Hold, the system will suspend the docker container from the Capsule. This will preserve all working spaces at the time when you leave the Cloud Workstation. The next time you access the Capsule, it will resume the Cloud Workstation session with all the command history, the files or folders you created, and the packages you installed in the previous session.

circle-exclamation
circle-info

For reproducibility, it is strongly recommended to install packages using the Environment Editor.

To Exit a Cloud Workstation with Hold

  1. Click the Shut Down button.

  2. Click Hold to return to the Capsule and close the Cloud Workstation.

  3. After the Cloud Workstation is held, the system redirects you to the Capsule view.

    On the Capsule dashboard, you can see the status of the Capsule is 'CW on hold' when you hover over the Capsule.

Edit a 'CW on Hold' Capsule

You can edit a Capsule with a 'CW on Hold' status. You can add new files, execute a Reproducible Run, attach a secret and a Data Asset.

circle-info

You can add packages in the Environment Editor, but since the Cloud Workstation is on hold (the Docker container for the computation is on hold), the changes will be effective when the Docker container is rebuilt.

Resume or Discard a 'CW on Hold' Capsule

In the Capsule view under the Reproducible Run button, you can choose to either Resume or Discard a held Cloud Workstation.

  • Resume: Restores the Cloud Workstation to its previous state and allows you to continue the session.

  • Discard: Shuts down the Cloud Workstation, ending the session entirely.

Collaborating on a Held Capsule

Collaborators with edit permissions can:

  • View files synced from a held Cloud Workstation session.

  • Resume the held Cloud Workstation to continue working from the previous session as shown below.

Shut Down a Cloud Workstation

When exiting a Cloud Workstation via Shut Down, the system turns off the Docker container associated with the Capsule and syncs back all the content under the ~/capsule directory, which includes the following folders:

  • /metadata

  • /environment

  • /code

  • /data

  • /scratch

  • /results

This means that it will not preserve any content created outside the "Capsule" folder, or any packages installed during the session. Installed packages will be suggested via a reminder in Package Suggestions, and you can choose to add them to the environment editor.

circle-info

Content saved outside the ~/capsule directory or within the /results folder will not be synced back to the Capsule and will be lost in future sessions.

Note: A Cloud Workstation can be shut down, or put on hold either directly from the Cloud Workstation or from the Capsule Dashboard as shown below

Package Suggestions

The system detects new packages installed during your Cloud Workstation session. When you shut down the Cloud Workstation and return to the Capsule view, a reminder will appear indicating the new packages that were installed in the Cloud Workstation.

To reproduce the environment that you created in the Cloud Workstation, review the package suggestions and add the appropriate packages to via the Environment Editor. Refer to Package Managers and Adding Packages to learn more about installing packages in the Capsule view.

Behavior of a Capsule Upon Cloud Workstation Hold/Pause and Shutdown

Capsule Component
Restored after Cloud Workstation termination
Restored after Cloud Workstation hold/pause

Changes made to files written to /scratch, /code, and /data

Changes made to files written to /results

Data Assets attached in CW

Data Assets detached in CW

Occupied root volume

Installed Packages

Loaded Packages (R)

Created virtual environments

Linux environment variables set

Variable values

Output of previous Jupyter cells

R environment states/previously run lines

Unsaved changes written to R scripts

Note: the version of the file is subject to change

VSCode active debug sessions

Previous Actions in no-code app

VSCode - installed extensions

Preferences set in RStudio (Font size, theme color, etc.)

Preferences set in Jupyterlab (Dark/Light mode, UI Font size)

Was this helpful?