quickstart.config#

Quickstart configuration management.

Module Contents#

Classes#

QuickstartConfig

Configuration for quickstart cluster.

Data#

API#

quickstart.config.InferenceProviderType#

None

class quickstart.config.QuickstartConfig(/, **data: typing.Any)#

Bases: pydantic.BaseModel

Configuration for quickstart cluster.

Stored in ~/.config/nmp/quickstart.yaml with environment variable overrides.

Environment variables use the NMP_QUICKSTART_ prefix:
  • NMP_QUICKSTART_IMAGE: Container image

  • NMP_QUICKSTART_HOST_PORT: Host port

  • NMP_QUICKSTART_STORAGE_PATH: Storage directory

  • NMP_QUICKSTART_DOCKER_SOCKET: Docker socket path

  • NGC_API_KEY: NGC API key for image pulls

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

admin_email: str | None#

‘Field(…)’

auth_enabled: bool#

‘Field(…)’

container_id: str | None#

‘Field(…)’

container_name: str#

‘Field(…)’

container_port: int#

‘Field(…)’

property data_path: pathlib.Path#

Get the data directory path.

docker_socket: pathlib.Path#

‘Field(…)’

classmethod get_default_config_path() pathlib.Path#

Get the default configuration file path.

Checks XDG_CONFIG_HOME first, then falls back to ~/.config/nmp/quickstart.yaml.

get_registry_host() str#

Extract registry host from image name.

host_port: int#

‘Field(…)’

image: str#

‘Field(…)’

inference_provider: quickstart.config.InferenceProviderType | None#

‘Field(…)’

is_ngc_registry() bool#

Check if the configured image uses NGC registry.

classmethod load(path: pathlib.Path | None = None) typing_extensions.Self#

Load configuration from YAML file with environment variable overrides.

Parameters:

path – Path to config file. Uses default path if not provided.

Returns:

QuickstartConfig instance with merged file and environment settings.

model_config#

None

network_name: str#

‘Field(…)’

ngc_api_key: pydantic.SecretStr | None#

‘Field(…)’

parse_image_components() tuple[str, str]#

Parse image into (registry, tag) components.

Image format: [registry/][name][:tag] .. rubric:: Examples

  • “nvcr.io/nvidia/nemo-microservices/nmp-api:25.10” → (“nvcr.io/nvidia/nemo-microservices”, “25.10”)

  • “my-registry/nmp-api:local” → (“my-registry”, “local”)

  • “registry:5000/image:v1” → (“registry:5000”, “v1”)

  • “nmp-api:latest” → (“”, “latest”)

  • “nmp-api” → (“”, “latest”)

Returns:

Tuple of (image_registry, image_tag)

parse_reserved_gpu_device_ids() list[int] | None#

Parse reserved_gpu_device_ids string into a list of integers.

Uses the shared parser in gpu_config for consistency with CUDA_VISIBLE_DEVICES parsing.

Returns:

List of GPU device IDs; None if field is None or contains invalid values; empty list if field is empty or whitespace-only string.

platform_config_path: pathlib.Path | None#

‘Field(…)’

classmethod remove() None#

Remove the configuration file.

reserved_gpu_device_ids: str | None#

‘Field(…)’

resolve_best_image() str#

Return the best available image for the installed SDK build.

If no image is explicitly configured, this method looks up the image tag for the installed SDK build and selects the right registry based on whether the tag is an internal or public release:

  • Internal tags (nightly-YYYYMMDD, YY.MM-kN) live in the private NGC registry. An NGC API key is required and a registry manifest check is performed to confirm access before returning the image. Falls back to self.image if the key lacks access.

  • Public GA tags (e.g. 26.03) live in the public NGC registry. No key is required; the image is returned directly if it exists.

The image tag is sourced from (in priority order):

  1. NMP_IMAGE_TAG environment variable — overrides the SDK-baked tag so you can test against a specific release without reinstalling (e.g. NMP_IMAGE_TAG=26.03).

  2. __image_tag__ stamped into the installed nemo-platform SDK (nemo_platform._version) at release time.

The access check is performed via the Docker daemon’s distribution endpoint (a lightweight manifest HEAD — no image data is transferred).

Returns:

The resolved image string if available, otherwise self.image.

save(path: pathlib.Path | None = None) None#

Save configuration to YAML file.

Parameters:

path – Path to save to. Uses default path if not provided.

serialize_secrets(
value: pydantic.SecretStr | None,
info: pydantic.functional_serializers.SerializationInfo,
) str | None#

Serialize secrets, revealing only when context requests it.

storage_path: pathlib.Path#

‘Field(…)’

use_gpu: bool#

‘Field(…)’