Use NVIDIA NGC Catalog with Kaptain
Kaptain is compatible with the usage of Nvidia’s NGC catalog in networked environments, which you can access and set up via the Kubeflow UI; however, usage of NGC catalog components is not covered under D2iQ’s support policy.
The NGC catalog includes containers, charts, pre-trained models, toolkits and more, which are optimized for GPU deployment and can be used to run AI workflows in Kaptain.
Since the NGC catalog is a constantly growing third-party catalog developed by NVIDIA, not all available images have been tested. Also, note that for some examples, you may need to install additional tools like TAO Toolkit, DeepStream SDK, NVIDIA TensorRT and others, which is beyond the scope of this documentation.
You have deployed Kaptain into a cluster.
You have a Kubeflow profile, and permissions to create notebooks.
You have permissions to access the NGC component.
Prepare your Kubeflow user profile
You do not need to download, nor install anything to be able to access the NGC catalog. You can visit NVIDIA’s NGC catalog page directly or access it from your Kaptain instance. However, you have to set the default entry point for Jupyter Lab first.
In your Kubeflow profile, create a custom configuration for a notebook server to launch in Jupyter Lab. Specify the
kubeflow-profile where you want to create the notebook.
Create or edit a
apiVersion: "kubeflow.org/v1alpha1" kind: PodDefault metadata: name: custom-entrypoint namespace: <kubeflow-profile> spec: selector: matchLabels: custom-entrypoint: "true" desc: "Launch as Jupyter Lab" command: - jupyter args: - lab - --notebook-dir=/workspace - --ip=0.0.0.0 - --no-browser - --allow-root - --port=8888 - --NotebookApp.token='' - --NotebookApp.password='' - --NotebookApp.allow_origin='*' - --NotebookApp.base_url=$(NB_PREFIX)
Run this command to apply the new entry point:CODE
kubectl apply -f poddefault.yaml
Find a notebook, container or resource in the NGC catalog
Browse through NGC’s website and select the container (image, notebook, or resource) you would like to run. You can do this by visiting the NGC catalog directly, or by logging into your Kaptain instance and selecting NGC catalog on the sidebar menu.
Copy and note down the download command for the container by selecting Pull Tag and choosing the required version. This copies the command and image name into your clipboard. You only need the image name.
Launch a container with the image you want to run
Log into your Kaptain instance in the Kubeflow UI and select Notebooks > New notebook.
Fill out the fields as required, and ensure you provide the right information in these fields:
In the Custom Image field, paste the image name (without the command) you copied in the previous section.
In the Configurations field, select Launch as Jupyter Lab.
NOTE: If you configured your cluster with GPU support, and you want to give your notebook access to GPU resources, go to the GPU section, enter the number of GPUs, and select NVIDIA as a GPU Vendor.
Download and run a Jupyter notebook
Once you have launched the container, you can continue to run a Jupyter notebook, as shown in this example. You can find the Jupyter notebook in the notebook list in Kubeflow.
Log in to your Kaptain instance via the Kubeflow UI, and select Notebooks.
Select Connect next to the notebook.
In Jupyter Lab, change to your
In the NGC catalog, find a resource, and use the Download button to copy the WGET command for your notebook resources.
In Jupyter Lab, paste and run that command.
Unzip the file to access the resources.CODE
Locate and run the notebooks from the downloaded files.
Use the NGC catalog
For more information on how to use resources of the NGC catalog, refer to the NGC catalog documentation.