By default, Jupyter notebooks will be run from the top down, just like all other Code Ocean capsules. This means that each cell will be executed in sequence, and the final result will be a notebook with inline results files. We recommend using the nbconvert library to do this. 

However, you may also choose to run Jupyter Notebooks interactively, meaning that you can run code cell-by-cell (or line by line, if your have a cell that is a single line).

To begin an interactive session, click the dropdown arrow next to the Run button.

After the computational environment boots up, you will soon see a ‘Click to open Jupyter’ link.

Clicking this will launch the typical Jupyter experience in your browser, running live inside your custom computational environment on Code Ocean’s servers. You can open notebooks (or a terminal), add or edit cells to try new parameters, experiment, and to facilitate debugging. 

Note that leaving an interactive Jupyter session running will continuously use quota until you stop the run, either by clicking the red X (‘Stop run’) or the trash can icon ('Cancel'). 

Every 30 minutes, your Jupyter session will ask you if you are still there. This is to prevent an idly open Jupyter tab from exhausting your quota. When you open an interactive Jupyter session, you may be prompted to accept notifications from Code Ocean. If you accept, you will receive this half-hourly reminder in your open Jupyter tab. If you do not accept, it will pop up in the Code Ocean capsule from which you launched Jupyter. 

If you do not actively signal that you are still working, every 30 minutes, your session will end and your work will be lost. Please pay attention to these notifications. 

Lastly, interactive Jupyter notebooks are run in a separate container from their associated compute capsule in your browser. As such, you will be leaving the Code Ocean environment and your regular browser/Jupyter settings will apply.

 

Did this answer your question?