NGC Resource Downloader#
NGC is an NVIDIA file storage system. The ngc-resource-downloader
init container will download resources from NGC. For that, one or several NGC resource paths can be provided in the params
section of the microservice using the resource downloader.
Container Information#
Container Image |
nvcr.io/nvidia/ace/ngc-resource-downloader:1.2.0 |
Publishing Location |
nvidia/ace |
Previous Versions |
1.1.4 |
License |
NVAIE |
NGC Enablement |
Public |
Usage Example#
If needed, a secret with the NGC Personal Key can be used to access restricted content on NGC. Be sure to use an NGC Personal key and not an API key with the NGC Resource Downloader.
# Single resource example (remoteResourcePath is a string)
resourceDownload:
remoteResourcePath: nvidia/ace/default-avatar-scene:1.1.4
secretName: ngc-api-key-secret
image: nvcr.io/nvidia/ace/ngc-resource-downloader:1.2.0
# Multi resources example (remoteResourcePath is a map)
resourceDownload:
remoteResourcePath:
unrealEngineProject: "your-org/your-team/ia-unreal-renderer-asset-metahuman-example:0.1.0"
metahumanPak: "your-org/your-team/ia-unreal-renderer-asset-metahuman-configuration-example:0.1.0"
scenePak: "your-org/your-team/ia-unreal-renderer-asset-scene-configuration-example:0.1.0"
secretName: ngc-api-key-secret
image: nvcr.io/nvidia/ace/ngc-resource-downloader:1.2.0
Before deploying the UCS app, you must create a Kubernetes secret. The secret.yaml
configuration should look like the following snippet.
apiVersion: v1
data:
NGC_CLI_API_KEY: "******"
kind: Secret
metadata:
name: ngc-api-key-secret
namespace: animation-pipeline
type: Opaque
Alternatively, when run from docker, the remote resource paths can be provided via ENV variables.
# Single resource example (remoteResourcePath is a string)
REMOTE_RESOURCE_PATH=nvidia/ace/default-avatar-scene:1.1.4
# Multi resources example (remoteResourcePath is a map)
REMOTE_RESOURCE_PATH="{'unrealEngineProject': 'your-org/your-team/ia-unreal-renderer-asset-metahuman-example:0.1.0', 'metahumanPak': 'your-org/your-team/ia-unreal-renderer-asset-metahuman-configuration-example:0.1.0', 'scenePak': 'your-org/your-team/ia-unreal-renderer-asset-scene-configuration-example:0.1.0'}"
$ docker run --rm --name ngc_resource_downloader -v /path/to/your/resource/folder:/mnt/resources -e DESTINATION_RESOURCE_PATH=/mnt/resources -e REMOTE_RESOURCE_PATH=$REMOTE_RESOURCE_PATH -e NGC_CLI_API_KEY=$NGC_CLI_API_KEY nvcr.io/nvidia/ace/ngc-resource-downloader:1.2.0
Prerequisites#
Before you upload assets to NGC space, you have to download & install NGC CLI.
Also, make sure that you have access to NGC and you know your <ORG>
and <TEAM>
you would like to upload your asset to. If you don’t have access to NGC, reach out to your NVIDIA contact or to the NVIDIA support or use an alternative download method.
Create a Resource in NGC for the Asset#
Use the following command to create a new resource with the name <RESOURCE_NAME>
for your asset:
ngc registry resource create <ORG>/<TEAM>/<RESOURCE_NAME> --application OTHER --framework Other --format usda --precision Other --short-desc "Scene asset files for ACE"
For example, to create a resource in <ORG>
(your-org-name
), <TEAM>
(your-ngc-team
), <RESOURCE_NAME>
(avatar_scene
), use:
ngc registry resource create your-org-name/your-ngc-team/avatar_scene --application OTHER --framework Other --format usda --precision Other --short-desc "Scene asset files for ACE"
Uploading a Version to the NGC Resource#
To upload a version (e.g. 1) to the resource, make sure that the asset files are inside a single local folder, e.g. the /exported
directory created by the Avatar Configurator including the scene file Avatar_Scene.usd
and all the dependencies like textures.
To upload the resource files, provide the local <folder>
’s path as an argument to the following command:
ngc registry resource upload-version your-org-name/your-ngc-team/avatar_scene:1 --source <folder>
To download a resource, use:
ngc registry resource download-version "your-org-name/your-ngc-team/avatar_scene:1"
To remove a version, use:
ngc registry resource remove your-org-name/your-ngc-team/avatar_scene:1