Jupyter Notebook Server

About the Notebooks

The Jupyter notebooks provide guidance to building knowledge-augmented chat bots.

The following Jupyter notebooks are provided with the AI workflow for the default canonical RAG example:

Running JupyterLab Server Individually

To run the JupyterLab server for development purposes, run the following commands:

  • Optional: Notebooks 7 to 9 require GPUs. If you have a GPU and want to run one of these notebooks, update the jupyter-server service in the Docker Compose file to use ./notebooks/Dockerfile.gpu_notebook as the Dockerfile:

    jupyter-server:
      container_name: notebook-server
      image: notebook-server:latest
      build:
        context: ../../
        dockerfile: ./notebooks/Dockerfile.gpu_notebook
    

    These notebooks can use more than one GPU. To use more than one, specify the GPU IDs in the device_ids field or specify count: all

    jupyter-server:
      deploy:
        resources:
          reservations:
            devices:
              - driver: nvidia
                device_ids: ['0', '1']
                capabilities: [gpu]
    
  • Build the container from source:

    $ source deploy/compose/compose.env
    $ docker compose -f deploy/compose/rag-app-text-chatbot.yaml build jupyter-server
    
  • Start the container which starts the notebook server:

    $ source deploy/compose/compose.env
    $ docker compose -f deploy/compose/rag-app-text-chatbot.yaml up jupyter-server
    
  • Open the JupyterLab server at http://host-ip:8888