Skip to content
Neutree Documentation

Managing image registries

The image registry is an important component of the Neutree infrastructure layer, providing the container images required for cluster deployment.

If the cluster nodes can connect to a Docker-compatible image registry (such as Docker Hub), the cluster will retrieve Neutree container images through the registries you create. If no image registry (such as Harbor or Docker Hub) is available in your environment, see Setting up a temporary image registry.

If the cluster nodes cannot connect to the above registries or the connection is slow, select an import method based on the image type.

  1. Log in to the Neutree management interface. Click Image Registries in the left navigation pane, then click Create on the right.

  2. Fill in the configuration.

    • Basic Information

      ParameterDescriptionEditable after creation
      NameThe name of the image registry.No
      WorkspaceThe workspace to which the image registry belongs.No
    • Image Registry

      Parameter Description Editable after creation
      URL The URL of the image registry. When using Docker Hub, the URL is https://docker.io. Yes
      Repository The project or repository in the image registry.

      Leave this field empty in the following cases:

      • When using Docker Hub.
      • When no project name was set when uploading images with the CLI tool.
      Yes
    • Authentication

      Parameter Description Editable after creation
      Username The username for accessing the image registry. Yes
      Password The password for accessing the image registry. Yes
  3. After confirming that all configurations are correct, click Save.

Log in to the Neutree management interface. Click Image Registries in the left navigation pane. The registry list on the right shows all current image registries. Click a registry name to view its details.

When you need to use a custom service image, Flex Engine image parameter, or another supporting component image in Neutree, you can use the CLI to import the image to the image registry managed by Neutree.

Applicable scenarios include:

  • When using Flex Engine or a custom inference engine, import the custom service image to the image registry managed by Neutree, and reference it through the image parameter in engine variables.
  • In an offline environment, import a single service image exported by docker save to an image registry that Neutree can access.
  • Validate a temporarily built custom image or patched image, and reference the imported image address in an inference instance or YAML configuration.

Prerequisites

  • You have created an image registry, and the registry is in a healthy state.
  • The image to be imported already exists in the local Docker daemon, or you have prepared an image archive exported by docker save.
  • You have created an API key. Make sure that this API key has permission to read image registry credentials. If the API key cannot read the saved registry credentials, provide an image registry username and password with push permissions through command parameters.

Procedure

  1. Run the following command to import a local image:

    Terminal window
    ./neutree-cli-<arch> image push <image> \
    -w [workspace] \
    -r [image_registry] \
    [--target <repository[:tag]>] \
    [--registry-username <registry_username>] \
    [--registry-password <registry_password>] \
    --api-key <api_key> \
    --server-url <server_url>

    If the image to be imported is an archive generated by docker save, use the --archive parameter to load the archive before importing it:

    Terminal window
    ./neutree-cli-<arch> image push <image> \
    --archive <image_archive> \
    --target <repository[:tag]> \
    -w [workspace] \
    -r [image_registry] \
    --api-key <api_key> \
    --server-url <server_url>
    ParameterDescription
    <arch>Replace this with the CPU architecture of the server. Valid values are amd64 and arm64.
    <image>The name of the local image to import, for example, my-workload:v1. When using the --archive parameter, this name must match the image name included in the image archive.
    [workspace]The workspace to which the image registry belongs. Optional. If left empty, the default workspace is used.
    [image_registry]The name of the destination image registry. Optional. If left empty, default is used.
    [--target <repository[:tag]>]Optional. The repository path and tag of the destination image in the image registry. If left empty, the destination is generated automatically based on <image>.
    <image_archive>The path of the image archive generated by docker save. This parameter is required only when importing an image archive.
    [--registry-username <registry_username>] / [--registry-password <registry_password>]Optional. The image registry username and password used when importing the image. If left empty, the credentials saved in the image registry are used first.
    <api_key>The API key created during preparation.
    <server_url>The control plane access address, for example, http://localhost:3000.
  2. View the destination image address in the command output. When configuring a custom service image, Flex Engine image parameter, or another image reference later, use this address.

After an image registry is created, you can modify the registry URL, repository information, and authentication configuration as needed.

  1. Log in to the Neutree management interface. In the registry list or details page, click the menu icon () and select Edit.

  2. Modify the configuration as needed. For parameter descriptions, see Creating an image registry.

  3. After confirming that the configuration is correct, click Save to complete the edit.

You can delete one or more image registries at the same time.

  1. Log in to the Neutree management interface. In the registry list or details page, click the menu icon () and select Delete; or select multiple image registries in the list and click Delete above the list.

  2. In the confirmation dialog, confirm the deletion and click Delete. The selected image registries will be permanently deleted.