Skip to content

Commit

Permalink
opening-sessions: custom jupyter image requirements
Browse files Browse the repository at this point in the history
Closes #163
  • Loading branch information
giuseppe-steduto committed Nov 22, 2023
1 parent ed2ab86 commit ee6d48a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
Binary file modified docs/images/interactive-session-jupyter-notebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ui-open-session.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 20 additions & 17 deletions docs/running-notebooks/opening-sessions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,44 @@ It could take several minutes to start the interactive session.
Please note that it will be automatically closed after 7 days of inactivity.
```

!!! warning
REANA administrators can configure REANA to automatically close
inactive interactive sessions after a given period of inactivity.
As shown in the previous example, when you start an interactive session,
you will be informed about how long your inactive sessions will be kept open before they are
automatically closed. You can read more about this in the [closing sessions](../closing-sessions#auto-closure-of-inactive-sessions) section.
By clicking on the link you will have access to a Jupyter notebook interface:

![jupyter-notebook](../../images/interactive-session-jupyter-notebook.png){.screenshot-browser-mockup}

By default, newly opened sessions will use the
[`jupyter/scipy-notebook:notebook-6.4.5`](https://hub.docker.com/layers/jupyter/scipy-notebook/notebook-6.4.5/images/sha256-b6a4ce777b837496d5612b7ce4efba9aa015576cb6993817721b8d293a7c2a3c?context=explore) Docker image to spawn your notebook. You can supply
your desired image by passing it to the previous command with the
[`jupyter/scipy-notebook:notebook-6.4.5`](https://hub.docker.com/layers/jupyter/scipy-notebook/notebook-6.4.5/images/sha256-b6a4ce777b837496d5612b7ce4efba9aa015576cb6993817721b8d293a7c2a3c?context=explore)
Docker image to spawn your notebook.
If you would like to use a different image, you can pass it to the previous command with the
`-i/--image` option:

```console
$ reana-client open -w jupyter --image jupyter/scipy-notebook:notebook-6.4.7
==> SUCCESS: Interactive session opened successfully
https://reana.cern.ch/f8be55e4-5d18-43f9-b977-f773fdcab163?token=<your-reana-token>
It could take several minutes to start the interactive session.
Please note that it will be automatically closed after 7 days of inactivity.
```

By clicking on the link you will have access to a Jupyter notebook interface:

![jupyter-notebook](../../images/interactive-session-jupyter-notebook.png)
If you want to use a custom image, please note that it has to be based on one of the
[official Jupyter images](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-base-notebook)
(in this way, it will have Jupyter running on the port `8888` and the
[`start-notebook.sh`](https://github.com/jupyter/docker-stacks/blob/main/base-notebook/start-notebook.sh) script available).

!!! note
Keep in mind that this operation might take a minute, if you see
"Service unavailable", just wait and retry.
!!! warning
REANA administrators can configure REANA to automatically close
inactive interactive sessions after a given period of inactivity.
As shown in the previous examples, when you start an interactive session,
you will be informed about how long your inactive sessions will be kept open before they are
automatically closed. You can read more about this in the [closing sessions](../closing-sessions#auto-closure-of-inactive-sessions) section.

### Open from web interface

Alternatively, you can also open Jupyter notebook sessions from the
REANA web interface by going through a list of your workflows and
clicking on the vertical ellipsis menu on the right-hand-side and
REANA web interface by going through a list of your workflows,
clicking on the vertical ellipsis menu on the right-hand-side, and
selecting "Open Jupyter Notebook":

![ui-open-session](../../images/ui-open-session.png)
![ui-open-session](../../images/ui-open-session.png){.screenshot-browser-mockup}

When a workflow has an associated Jupyter notebook session opened, a
Jupyter icon will appear next to the workflow name; you can then click
Expand Down

0 comments on commit ee6d48a

Please sign in to comment.