Jupyter notebook example
Run Jupyter notebooks on OctoAI
Running Jupyter Notebooks on OctoAI
Deploying Jupyter Server on OctoAI
In a few steps, you can run containerized Jupyter Notebooks on OctoAI by deploying Jupyter Server as a custom endpoint. Most of this tutorial looks similar to Create your own Endpoint from an existing container.
- Navigate to the Endpoints page and click "New" to create a new service endpoint.
- Set up your endpoint:
- Give your new endpoint a name.
- Paste the name of your custom Jupyter Server image or use one of Jupyter's public images. In this example, we will use the public image
jupyter/datascience-notebook
- Set the container port to 8888. This is the Jupyter Server default.
- Set your endpoint to be publicly accessible.
- Configure hardware and autoscaling.
- Click "Create" to create the endpoint.
- When the page reloads, copy and paste the endpoint URL into your browser to trigger the image to build. If successful, the
Replicas
indicator will turn solid blue. You can check the status of the image build by clicking on the the transparent Replicas box.
It may take a few minutes for the image to build. During this time, you will not be able to access the server from the browser.
Your Jupyter Server is ready to use.
š Jupyter maintains several Docker images. If you don't need all of the features of a data science notebook, we suggest using thejupyter/minimal-notebook
image instead. - The first time you access your JS instance, you will be prompted to enter an access token. You can obtain the access token from the container logs.
- In the logs modal, search for a string like
http://my-jupyter-server-6676868b54-d676v:8888/lab?token=<ACCESS_TOKENL>
. - Copy and paste the ACCESS_TOKEN into your Jupyter Server's
Password or token
field.
- In the logs modal, search for a string like
Recommended: There is also the option to set up a password at this time. If you intend to keep and use this container for longer than a few sessions, we suggest doing this.
If successful, Jupyter Server will load a workspace like this one:
Using Custom Notebooks
To use a custom notebook, you can simply upload your notebook or notebooks from your local development environment to the Jupyter Server workspace:
That's it! You're now running Jupyter Server & Notebooks on OctoAI!
Updated 3 months ago