# Interactive Session Dependencies

> Source: https://parallelworks.com/docs/run/sessions/interactive-sessions/dependencies

# Interactive Session Dependencies

The interactive sessions described below have specific dependencies for their successful execution. For JupyterLab and Jupyter Notebook (version 7 and above), a Singularity container with an [unprivileged NGINX](https://github.com/parallelworks/interactive_session/blob/main/jupyter-host/nginx-unprivileged.def) is essential for proxying. Typically, this and other optional Singularity containers are located in a shared directory within the cluster. Additionally, a desktop environment and VNC Server are required to establish a basic desktop session.

## Jupyter

### JupyterLab Host

Starts a JupyterLab server in the specified host. 

Dependencies:
- JupyterLab, which can be loaded as a module or installed in a Conda environment. The workflow expects a command to load the Python environment with JupyterLab. If no command is provided, the workflow installs Conda, creates a Conda environment, and installs JupyterLab with the following commands:
  - `conda install -c conda-forge jupyterlab -y`
  - `conda install nb_conda_kernels -y`
  - `conda install -c anaconda jinja2 -y`
- Docker or an unprivileged NGINX Singularity container is required to proxy the Jupyter Notebook server. For more information, see [this Singularity definition file](https://github.com/parallelworks/interactive_session/blob/main/jupyter-host/nginx-unprivileged.def).

### Jupyter Notebook Host

Starts a Jupyter Notebook server in the specified host. 

Dependencies:
- Jupyter Notebook, which can be loaded as a module or installed in a Conda environment. The workflow expects a command to load the Python environment with Jupyter Notebook. If no command is provided the workflow installs Conda, creates a Conda environment and installs Jupyter Notebook with the following commands:
  - `conda install -c anaconda jupyter -y`
  - `conda install nb_conda_kernels -y` 
  - `conda install -c anaconda jinja2 -y`
- If the version of Jupyter Notebook is 7 or higher, Docker or an unprivileged NGINX Singularity container is required to proxy the Jupyter Notebook server. For more information, see [this Singularity definition file](https://github.com/parallelworks/interactive_session/blob/main/jupyter-host/nginx-unprivileged.def).

### Jupyter Notebook Singularity

Starts a Jupyter Notebook server inside a user specified Singularity container. 

Dependencies:
- Singularity
- Singularity container with Jupyter. For example, see [this TensorFlow Singularity definition file](https://github.com/parallelworks/interactive_session/blob/main/jupyter-singularity/tensorflow_latest-gpu-jupyter-extra.def).
- If the version of Jupyter Notebook is 7 or higher an unprivileged NGINX Singularity container is also required to proxy the Jupyter Notebook server, see [this Singularity definition file](https://github.com/parallelworks/interactive_session/blob/main/jupyter-host/nginx-unprivileged.def).

### Jupyter Notebook Docker

Starts a Jupyter Notebook server inside a user specified Docker container. 

Dependencies:
- Docker

## Remote Desktop

Remote desktop sessions require a desktop environment and a remote display protocol (VNC Server, NICE DCV, SCW, etc.). Additionally, if other software tools are installed in the host, such as RStudio or MATLAB, the interactive session can be configured to open these GUI tools at start time. 

### VNC Server

Starts a remote desktop server using VNC Server. 

Dependencies:
- VNC Server. For example:
  - `dnf install tigervnc-server -y`
  - `dnf install python3 -y`
- Desktop environment. For example:
  - `dnf groupinstall "Server with GUI" -y`

### NICE DCV Server

Starts a remote desktop server using NICE DCV. 

Dependencies:
- NICE DCV Server. Follow [this link](https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux.html) for installation instructions.
- Desktop environment. For example:
  - `dnf groupinstall "Server with GUI" -y`

### Scyld Cloud Workstation Server

Starts a remote desktop server using Scyld Cloud Workstation. 

Dependencies:
- Scyld Cloud Workstation. Follow [this link](https://updates.penguincomputing.com/scw/scyld-cloud-workstation/install.html) for installation instructions.
- Desktop environment. For example:
  - `dnf groupinstall "Server with GUI" -y`

## Other

### MATLAB Docker

Starts a MATLAB server inside a Docker container, see [this link](https://www.mathworks.com/help/cloudcenter/ug/matlab-container-on-docker-hub.html). 

Dependencies:
- Docker

This session could be converted to Singularity in which case it needs:
- Singularity container with MATLAB
- An unprivileged NGINX Singularity container, see [this Singularity definition file](https://github.com/parallelworks/interactive_session/blob/main/jupyter-host/nginx-unprivileged.def).

### Open Visual Studio Code

Starts a VS Code server. 

Dependencies:
- VS Code. For example, see [this link](https://github.com/coder/code-server/releases).

### Webshell

Starts a terminal. It does not require admin installation.
