Example AI Workbench Project Spec File
The following is an example of an AI Workbench project spec.yaml file.
specVersion: v2specMinorVersion: 1meta:name: example-projectimage: project-example-projectdescription: An example project using PyTorchlabels: []createdOn: "2024-01-04T23:32:17Z"defaultBranch: mainlayout:- path: code/type: codestorage: git- path: models/type: modelsstorage: gitlfs- path: data/type: datastorage: gitlfs- path: data/scratch/type: datastorage: gitignoreenvironment:base:registry: nvcr.ioimage: nvidia/ai-workbench/pytorch:1.0.2build_timestamp: "20231212000523"name: PyTorchsupported_architectures: []cuda_version: "12.2"description: A Pytorch 2.1 environment with CUDA 12.2entrypoint_script: ""labels:- cuda12.2- pytorch2.1apps:- name: jupyterlabtype: jupyterlabclass: webappstart_command: jupyter lab --allow-root --port 8888 --ip 0.0.0.0 --no-browser--NotebookApp.base_url=\$PROXY_PREFIX --NotebookApp.default_url=/lab --NotebookApp.allow_origin='*'health_check_command: '[ \$(echo url=\$(jupyter lab list | head -n 2 | tail-n 1 | cut -f1 -d'' '' | grep -v ''Currently'' | sed "s@/?@/lab?@g") | curl-o /dev/null -s -w ''%{http_code}'' --config -) == ''200'' ]'timeout_seconds: 90stop_command: jupyter lab stop 8888user_msg: ""icon_url: ""webapp_options:autolaunch: trueport: "8888"proxy:trim_prefix: falseurl_command: jupyter lab list | head -n 2 | tail -n 1 | cut -f1 -d' ' | grep-v 'Currently'- name: tensorboardtype: tensorboardclass: webappstart_command: tensorboard --logdir \$TENSORBOARD_LOGS_DIRECTORY --path_prefix=\$PROXY_PREFIX--bind_allhealth_check_command: '[ \$(curl -o /dev/null -s -w ''%{http_code}'' http://localhost:\$TENSORBOARD_PORT\$PROXY_PREFIX/)== ''200'' ]'timeout_seconds: 90stop_command: ""user_msg: ""icon_url: ""webapp_options:autolaunch: trueport: "6006"proxy:trim_prefix: falseurl: http://localhost:6006programming_languages:- python3icon_url: ""image_version: 1.0.3os: linuxos_distro: ubuntuos_distro_release: "22.04"schema_version: v2user_info:uid: "1001"gid: "1001"username: "appuser"package_managers:- name: aptbinary_path: /usr/bin/aptinstalled_packages:- curl- git- git-lfs- vim- name: pipbinary_path: /usr/local/bin/pipinstalled_packages:- jupyterlab==4.0.7package_manager_environment:name: ""target: ""execution:apps: []resources:gpu:requested: 1sharedMemoryMB: 1024secrets: []mounts:- type: projecttarget: /project/description: project directoryoptions: rw- type: volumetarget: /data/tensorboard/logs/description: Tensorboard Log Filesoptions: volumeName=tensorboard-logs-volume
AI Workbench Project Spec Definition
Project Metadata
The spec file includes project metadata, such as version, name, description, and directory structure. The project spec file contains the following metadata fields:
Field | Description | Example Usage |
|---|---|---|
| Specifies the schema version number of the current project specification file. |
|
| Specifies the schema minor version number of the current project specification file. |
|
| Specifies the metadata for the project to appear correctly in the AI Workbench application. | — |
| Specifies the name of the project. |
|
| Specifies the name of the project container image. This image name is local to the computer and isn’t pushed to a container registry. |
|
| Specifies the description of the project. |
|
| Specifies a list of labels for the project. | — |
| Specifies when the project was created, formatted as an RFC 3339 string. |
|
| Specifies the default Git branch for the project. |
|
| Specifies a list of information about the project directories. AI Workbench uses this information to reconcile configuration. For instance, if a path was added to the .gitignore or .gitattributes files.
|
|
Project Environment Information
The specification file includes environment information, such as the container image for the project, and additional packages that are installed in it. You can manually configure this section of the spec, but typically it is populated automatically from the labels of the environment image that you select when you create a project.
Any manual modifications to the data in the environment.base section of the spec.yaml file are overridden when the environment version is updated.
In the environment section of the specification file, all fields are children of the base field.
environment:base:... all fields
The environment.base section contains the following fields.
Field | Description | Example Usage |
|---|---|---|
| Specifies the container registry that has the image. |
|
| Specifies the container image on top of which the project container is built. |
|
| Specifies the timestamp of the last image build. The timestamp is formatted in year, month, day, hour, minutes, and seconds. |
|
| Specifies the name of the container. |
|
| Specifies a list of supported architectures that the image is compatible with. |
|
| Specifies the version of the CUDA installed in the environment, if applicable. This field tells AI Workbench what version of the CUDA the host driver must support. If this value is not set correctly, you may experience runtime errors that AI Workbench fails to warn you about when starting the container. |
|
| Specifies the description of the container. |
|
| Specifies the path to the base-image entrypoint script that AI Workbench preserves and runs before the project |
|
| Specifies a list of labels for the container, such as search term keywords or descriptors. |
|
| Specifies a list of applications installed in the container. For the definition of the fields in |
|
| Specifies the list of programming languages installed in the container. |
|
| Specifies the link to the icon or image that is associated with the container. |
|
| Specifies the version number of the container image, if any exist. |
|
| Specifies the name of the container’s operating system. |
|
| Specifies the name of the container operating system’s distribution. |
|
| Specifoes the release version of the container operating system’s distribution. |
|
| Specifies the metadata for the version of the container label schema currently read by AI Workbench. |
|
| Specifies information about the user that the container processes should run as. |
|
| Specifies a list of package managers installed in the container, and for each one an optional list of installed packages. |
|
| Specifies a package manager environment that should be activated before installing packages and starting applications. This field is useful if your container uses a virtual environment or Conda when building. |
|
Project App Information
The specification file includes information about applications installed in the environment. This includes custom applications, such as commands and parameters for running them.
The Project App section contains the following fields:
Field | Description | Example Usage |
|---|---|---|
| Specifies the name of the application. This name appears in the user interface. |
|
| Specifies the type of application, used to determine what application-specific automation is run. |
|
| Specifies the class of application, used to determine what optional configuration options are available. Valid values are |
|
| Specifies the shell command used to start the application. Must not be a blocking command. |
|
| Specifies the shell command used to check the health or status of the application. A return of zero means the application is running and healthy. A return of non-zero means that the application is not running or unhealthy. |
|
| Specifies the number of seconds that AI Workbench waits for the |
|
| The shell command used to stop the application. |
|
| An optional message that appears to the user when the application is running. If |
|
| Specifies a link to the icon or image used for the application. This field is optional. |
|
| If
If
|
|
Project Runtime Information ----------------------------“
The specification file includes runtime information, such as environment variables, the number of GPUs to be mounted in the container, and custom application information.
The Project Runtime Information section contains the following fields:
Field | Description | Example Usage |
|---|---|---|
| Specifies information about how to run the project. | — |
| Specifies a list of custom applications installed in the project that are not part of the container environment. For the definition of the fields in |
|
| Specifies host resources that are requested or required to run the project.
For more information, see GPU Configuration. |
|
| Specifies a list of sensitive environment variables to set before the project starts. Only specify the name and description of each variable. The value of each variable is not part of the specification file and is configured at runtime. |
|
| Specifies a list of external folders and files that are used by the project, and where they should be located in the project container. The required values to configure the mount (like the source directory) are not part of the specification file, and are configured at runtime.
For more information, see Runtime Configuration (Environment Variables and Mounts). |
|
Container Specification
To view the full description and example usage for each field, see AI Workbench Project Spec Definition.
The specification file contains the following fields:
Field | Change? | Recommended Action |
|---|---|---|
| Required | Specify the container registry for your container of interest; if you have the Dockerfile, you may need to first build the container and push it to a registry. |
| Required | Specify the container image (and tag, if any) for your container of interest; if you have the Dockerfile, you may need to first build the container and push it to a registry. Also include the namespace if needed, but do not include the registry. |
| Optional | No manual updates are necessary. AI Workbench automatically updates this field when you build your environment. |
| Required | Specify the name for the container. AI Workbench will display the old container information in the UI if this setting isleft unchanged. |
| Recommended | Specify the list of supported architectures for your container. You can leave this blank if not applicable. |
| Required | Specify the version of CUDA installed in this container. If this isn’t applicable, you can leave this blank. AI Workbench matches drivers incorrectly if this is not updated. |
| Required | Specify a brief and informative description of the container. AI Workbench displays the old container information in the UI if left unchanged. |
| Optional | Specify the path to the base-image entrypoint script that AI Workbench must preserve. AI Workbench runs this script before the project-root |
| Recommended | Specify a list of search term keywords or labels to you want attached alongside your container. Consider these as search term keywords or descriptors for your container. |
| Recommended | Specify the applications that you are installing with in the container. For details, see Project App Information. |
| Recommended | Specify the programming languages that you are installing with this container, or leave blank if not applicable. |
| Optional | If you would like AI Workbench to display an icon as part of this container, link the URL to the icon image here or leave it blank for defaults. |
| Recommended | Specify the version number of the container image, if any. |
| Recommended | Specify the name of the container operating system. |
| Recommended | Specify the name of the container operating system distribution. |
| Recommended | Specify the release version of the container operating system distribution. |
| Optional | There is no need to update this field. However, if incorrect the project breaks. The current version is |
| Recommended | AI Workbench automatically provisions a user for you when you run the container, but this field overrides that user. |
| Recommended | For each package manager in the container, specify the name of the package manager, the complete path to the manager binary, and a comma-separated list of packages installed by that manager. If this remains unchanged, the package manager widget will likely not work, especially if you are working with a venv or conda environment. |
| Recommended | Specifies the package manager environment that should be activated before installing the packages and starting the applications. This setting is useful if your container uses a virtual environment or Conda when building. |