SealSkin
Server Referenceprovidersdocker_provider

DockerProvider

Launches applications as Docker containers on the local daemon.

Attributes

attributeclient
= get_docker_client()

Functions

constructor__init__(app_config) -> None

Create a provider bound to the shared Docker client.

paramapp_configdict[str, Any]

Resolved application dictionary.

Returns

None
funcget_local_image_info(image_name) -> dict[str, Any] | None

Return id and digests of a locally available image.

paramimage_namestr

Image reference.

Returns

dict[str, Any] | None

{"id", "short_id", "digests"} or None when not present.

funcget_remote_image_digest(image_name) -> str | None

Return the digest the registry currently serves for an image.

paramimage_namestr

Image reference.

Returns

str | None

The registry digest, or None if it could not be determined.

funcpull_image(image_name) -> Any

Pull an image from its registry.

paramimage_namestr

Image reference.

Returns

typing.Any

The pulled image object.

funclaunch(session_id, env_vars, volumes=None, gpu_config=None, network=None, is_collaboration=False, master_token=None, initial_tokens=None) -> dict[str, Any]

Run the application container and wait until it answers HTTP.

See launch for the arguments.

paramsession_idstr
paramenv_varsdict[str, str]
paramvolumesdict[str, Any] | None
= None
paramgpu_configdict[str, Any] | None
= None
paramnetworkstr | None
= None
paramis_collaborationbool
= False
parammaster_tokenstr | None
= None
paraminitial_tokensdict[str, Any] | None
= None

Returns

dict[str, typing.Any]
funcstop(instance_id) -> None

Stop (and remove) a container.

paraminstance_idstr

Container id.

Returns

None
func_wait_for_container_ready(container, session_id, subfolder, env_vars, timeout=60, is_collaboration=False, master_token=None, initial_tokens=None) -> str

Poll the container until its web endpoint answers.

paramcontainerAny

Docker container object.

paramsession_idstr

Session id for log prefixes.

paramsubfolderstr

URL prefix the app serves under.

paramenv_varsdict[str, str]

Environment used to derive the basic-auth credentials.

paramtimeoutint
= 60

Seconds to wait before giving up.

paramis_collaborationbool
= False

Also post the initial tokens to the control plane.

parammaster_tokenstr | None
= None

Control-plane master token.

paraminitial_tokensdict[str, Any] | None
= None

Tokens to post.

Returns

str

The container's IP address.

func_get_container_ip(container_attrs) -> str | None

Extract the first usable IP address from container attributes.

paramcontainer_attrsdict[str, Any]

Returns

str | None

On this page