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.

  1. Navigate to the Endpoints page and click "New" to create a new service endpoint.
  2. Set up your endpoint:
    1. Give your new endpoint a name.
    2. 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
    3. Set the container port to 8888. This is the Jupyter Server default.
    4. Set your endpoint to be publicly accessible.
    5. Configure hardware and autoscaling.
    6. Click "Create" to create the endpoint.
  3. 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 the jupyter/minimal-notebookimage instead.
  4. 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.
    1. In the logs modal, search for a string like http://my-jupyter-server-6676868b54-d676v:8888/lab?token=<ACCESS_TOKENL>.
    2. Copy and paste the ACCESS_TOKEN into your Jupyter Server's Password or token field.

šŸ“˜

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!