genvid.toolbox.SDK

class genvid.toolbox.SDK(cluster_id='local', **kwargs)

Bases: genvid.toolbox.basetool.BaseTool

Common commands for setting up the SDK.

This class wraps the ClusterAPI and BastionAPI for setting up a new Genvid SDK into the current cluster.

NAME = 'sdk'
SDK_CONFIG_VERSION = '1.7.0'
clean()

Stops the base SDK services.

clean_config()

Clean the configuration.

clean_images()

Remove all images for the cluster

get_config() → dict

Get the current cluster configuration.

get_images_config() → dict

Get the image configuration from the cloud. The image name must match DockerTool.RE_IMAGE_IMAGEID.

get_s3_bucket_id()

Get the S3 bucket ID.

get_sdk_config() → dict

Get the default SDK configuration.

is_jobs_running()

Return True if a job is configured to be running.

merge_dict(source, destination)

Merge 2 dictionaries.

Parameters:
  • source – The source dictionary.
  • destination – The destination dictionary.
remove_config(config: dict)

Remove values from the configuration. :param config: The configuration to remove values from.

set_config(config: dict = None)

Merge the specified configuration with the current one. :param config: The configuration to merge.

setup()

Starts the base SDK services.

start_jobs(jobs: typing.List[str])

Start all jobs or the specified job. :param jobs: The list of jobs to start.

stop_jobs(jobs: typing.List[str])

Stop all jobs or the specified job. :param jobs: The list of jobs to stop.

update_config(config: dict = None)

Update the specified configuration. :param config: The configuration to update. :return: The updated configuration.

upload_images(prefixes: typing.List[str])

Upload the images with the specified prefixes. The image names must match DockerTool.RE_IMAGE_IMAGEID.

Parameters:prefixes – Upload only files with these prefixes.
upload_images_sdk()

Upload the images for the SDK.