Developing and Containerizing Kit Apps#

Overview#

The information below explains the process of developing and containerizing Omniverse Kit Applications for Streaming using Kit App Template.

Prerequisites#

Omniverse Kit SDK#

This guide outlines two methods for building your Omniverse Kit Application, both of which are detailed below:

Create a Project Directory#

Omniverse Kit SDK must target a directory where the build scripts will be installed. These steps are outlined on the Kit SDK Linux resource page on NGC.

Open a terminal to where Kit SDK has been extracted. To create the new project directory, run the following commands:

./new_project.sh

After running ./new_project.sh, you will be prompted to accept the EULA and choose a folder to create a new Kit project.

Create a New Application from Template#

All commands in this section should be executed within the build directory created in <PATH_TO_DIR>/my-kit-project.

Note

If starting with Kit App Template, begin at this step.

Navigate to your newly created project folder, run ./repo.sh template new to generate a new templated Kit application using the commands below:

cd my-kit-project

./repo.sh template new

If this is your first time running the template new tool, you’ll be prompted to accept the Omniverse Licensing Terms.

Follow the prompt instructions:

  • ? Select what you want to create with arrow keys ↑↓: Application

  • ? Select desired template with arrow keys ↑↓: USD Viewer (or choose a different template)

  • ? Enter name of application .kit file [name-spaced, lowercase, alphanumeric]:

    [set application name]

  • ? Enter application_display_name: [set application display name]

  • ? Enter version: [set application version]

Depending on the Application Template selected, it may ask additional prompts for setup and extra extensions. The application template you have selected requires a extra extension. Follow the prompts to enter name of extension, extension display name, and version.

Successfully created application: Application [application name] created successfully in [path to project]/source/apps/[application name]

Following the creation of the Application, there will be a prompt asking if you would like to add application layers, which are used to define additional functionality added to the base application. Two streaming layers are available:

  • Omniverse Kit App Streaming (Default): for local streaming or self-managed deployments.

  • NVCF Streaming: required for applications deployed via NVIDIA Cloud Functions (NVCF).

For this example, select the NVCF Streaming application layer, which will add the app.name_nvcf.kit application layer template that is configured for Kit app streaming via NVCF, including settings and extensions.

  • ? Do you want to add application layers? Yes

  • ? Browse layers with arrow keys ↑↓: [SPACE to toggle selection, ENTER to confirm selection(s)]

    [ ] [omni_default_streaming]: Omniverse Kit App Streaming (Default)
    ❯ [X] [nvcf_streaming]: NVCF Streaming

Explanation of Example Selections:

  • .kit file name: This file defines the application according to Kit SDK guidelines. The file name should be lowercase and alphanumeric to remain compatible with Kit’s conventions.

  • display name: This is the application name users will see. It can be any descriptive text.

  • version: The version number of the application. While you can use any format, semantic versioning (e.g., 0.1.0) is recommended for clarity and consistency.

  • application layers: These optional layers add functionality to enable and configure streaming capabilities.

Add Layers to an Existing Application#

If you did not add streaming layers during the initial setup, or want to add additional layers later, use the modify command:

./repo.sh template modify

When prompted, select the application .kit file to update, then choose the layer or layers to add. After the operation completes, rebuild the project with ./repo.sh build.

Build the Kit App#

Build your new application with the following command:

./repo.sh build

A successful build will display the following message:

BUILD (RELEASE) SUCCEEDED (Took XX.XX seconds)

Launch the Kit App#

Initiate your newly created application using:

./repo.sh launch
  • ? Select with arrow keys which App you would like to launch: [Select the created application]

Launch your Kit app to ensure that it has built and runs successfully before containerizing the application. Exit the application once successful.

Containerize the Kit App#

To package your application as a container image, use:

./repo.sh package_container

You will be prompted to select a .kit file to serve as the application to launch via the container entrypoint script. This will dictate the behavior of your containerized application.

  • ? Select with arrow keys which App you would like to launch:

    [Select the app.name_nvcf.kit application]

After this step is complete, invoke the docker image ls command and you should see the Omniverse Kit Application in the container registry app-name_nvcf:latest.

The container option allows for specifying --image-tag to name the container image:

./repo.sh package_container --image-tag [container_image_name:container_image_tag]

Optional: you can launch your containerized app to test it locally. The --container option launches a containerized application (Linux only):

./repo.sh launch --container