If your project contains a Jupyter notebook, there are two ways to run it. The first is to use the
jupyter nbconvert command in a shell script, rendering it to HTML. The second is to run Jupyter interactively by launching a Jupyter environment in a separate tab.
To install Jupyter on Code Ocean:
On any capsule with either a Conda or pip installer available, click the Environment and Dependencies icon and add
jupyter through either. (You can add the pip installer dynamically by adding
python-pip via apt-get.)
To use Jupyter on Code Ocean:
From the interactive sessions dropdown, select Jupyter:
This will trigger a new run accompanied by the words 'Interactive Session.'
Third, when the words turn blue, click them (this is a link):
To launch Jupyter!
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.
Five general caveats about interactive sessions on Code Ocean:
- Leaving an interactive session running will continuously use quota until you stop the run by clicking the red square in the screenshot above.
- Every 30 minutes, your interactive session will ask you if you are still there. This is to prevent an idly open tab from exhausting your quota.
- When you open an interactive session, you may be prompted to accept notifications from Code Ocean. If you accept, you will receive this half-hourly reminder in your open interactive tab. If you do not accept, it will pop up in the Code Ocean capsule from which you launched the interactive session.
- If you do not actively tell Code Ocean that you are still working, every 30 minutes, your session will end and your work will be lost. Please pay attention to these notifications.
- Work done in an interactive session will not be saved to your /code and /data panes. For the time being, please copy and re-implement any changes you wish to save back to your code and data.