Registry — DeepStream documentation (original) (raw)

Registry Overview

The Registry is an integral part of the Graph Composer ecosystem and is responsible for providing unified interface between the extensions and tools. Registry service can be accessed using registry CLI:

In the backend, Registry communicates with Nvidia Cloud repository and Local workspace for extension management while it uses local database as cache of extension metadata.

Repository Manager#

Repository manager is responsible to communicating with NVIDIA Cloud repository or local workspace based on operation or arguments to operation.

NVIDIA Cloud Repository#

Extensions from Nvidia for public access are published in Nvidia Cloud repository. External users can access these extensions using registry repo sync -n ngc-public command. This command downloads all published extensions metadata to Cache on local disk.

Local Workspace#

Local workspace is provided for Extension Development Workflow. Registry stores current development version of extension in local workspace. Default workspace path used by Registry is /var/tmp/gxf/.cache/gxf_workspace. It stores only one version so it will overwrite whenever user updates version of extension and adds it to registry.

Note

/var/tmp/gxf/` is considered as the registry root on local disk which is configurable using the GXF_REGISTRY_ROOT environment variable.

Cache#

Registry maintains metadata for all extensions synchronized from Nvidia Cloud repository or added locally by Extension Development Workflow. It allows quick access to extension metadata on query from tools. Users can clean cache or refresh cache using Registry Command Line Interface commands. Users has to sync repositories again after cleaning cache to query extension information from registry.

Registry maintains two types of cache. The extension metadata contains extension interfaces from all the extensions that were synced along with their corresponding variants which have been uploaded to NGC. This cache is populated by the registry by registry repo sync command. The extension variants are cached by the registry graph install command. The variant archive containing the extension library along with any other headers, source or data files are cached the first time they are downloaded from a NGC repo and reused for subsequent registry graph install operations.

Note

/var/tmp/gxf/ is considered as the registry root which is configurable using the GXF_REGISTRY_ROOT environment variable. Optionally, registry cache --set command can be used to set a specific path for the registry cache.

Note

If Composer is being lauched from a docker, the registry cache from the host can be accessed in the docker by mounting the registry cache path.

Sample Command for docker launch: :: docker run -it –rm –net=host –runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix -v /var/tmp/gxf/.cache/gxf_registry/:/var/tmp/gxf/.cache/gxf_registry/ –privileged :

Extension Registration#

Extension registration adds a new extension to the registry’s cache and default repository. register_extension macro can be used to register a new extension with the registry.

Mandatory fields:

Optional fields:

Once register_extension macro has been invoked, a manifest file would be auto generated and the registry CLI tool would be used to run extn add command along with the corresponding arguments. This rule further adds this extension to the registry’s local cache and updates the default repository with the extension library, manifest, metadata, and any of the optional files that were specified during registration. The registration process also generates an output file which contains metadata regarding the extension’s interface. More specifically, it contains information regarding various components and the parameters used in those components, header files, dependencies, labels, author, description etc.

Here are the guidelines for registering an extension:

Installing graphs for deployment#

The registry can also be used to deploy graphs locally or containerize the graph using container builder. To execute a graph using gxe, the registry provides a functionality to prepare a manifest and a corresponding archive package containing all the extensions that are required.

Sample Graph Deployment

An example manifest for the sample graph above is shown here:

Sample Graph Manifest

An example archive for the sample graph above is shown here:

Sample Graph Archive

To install a graph: