Vertex AI#

RAPIDS can be deployed on Vertex AI Workbench.

For new, user-managed notebooks, it is recommended to use a RAPIDS docker image to access the latest RAPIDS software.

Prepare RAPIDS Docker Image#

Before configuring a new notebook, the RAPIDS Docker image will need to be built to expose port 8080 to be used as a notebook service.

FROM nvcr.io/nvidia/rapidsai/rapidsai-core:23.04-cuda11.8-runtime-ubuntu22.04-py3.10
EXPOSE 8080

ENTRYPOINT ["jupyter-lab", "--allow-root", "--ip=0.0.0.0", "--port=8080", "--no-browser", "--NotebookApp.token=''", "--NotebookApp.allow_origin='*'"]

Once you have built this image, it needs to be pushed to Google Container Registry for Vertex AI to access.

$ docker build -t gcr.io/<project>/<folder>/nvcr.io/nvidia/rapidsai-core:23.04-cuda11.8-runtime-ubuntu22.04-py3.10 .
$ docker push gcr.io/<project>/<folder>/nvcr.io/nvidia/rapidsai-core:23.04-cuda11.8-runtime-ubuntu22.04-py3.10

Create a New Notebook#

  1. From the Google Cloud UI, navigate to Vertex AI -> Dashboard and select + CREATE NOTEBOOK INSTANCE.

  2. Under the Environment section, specify Custom container, and in the section below, select the gcr.io path to your pushed RAPIDS Docker image.

  3. Under Machine Configuration select an NVIDIA GPU.

  4. Check the Install NVIDIA GPU Driver option.

  5. After customizing any other aspects of the machine you wish, click CREATE.

TEST RAPIDS#

Once the managed notebook is fully configured, you can click OPEN JUPYTERLAB to navigate to another tab running JupyterLab to use the latest version of RAPIDS with Vertex AI.

For example we could import and use RAPIDS libraries like cudf.

In [1]: import cudf
In [2]: df = cudf.datasets.timeseries()
In [3]: df.head()
Out[3]:
                       id     name         x         y
timestamp
2000-01-01 00:00:00  1020    Kevin  0.091536  0.664482
2000-01-01 00:00:01   974    Frank  0.683788 -0.467281
2000-01-01 00:00:02  1000  Charlie  0.419740 -0.796866
2000-01-01 00:00:03  1019    Edith  0.488411  0.731661
2000-01-01 00:00:04   998    Quinn  0.651381 -0.525398