SealSkin

DockerProvider

Launches applications as Docker containers on the local daemon.

Attributes

attributeclientAny

The shared Docker client.

Functions

funcinspect_self() -> None

Map the server container's mounts, ports, and network (see inspect_self_container).

Returns

None
funcdetect_gpus() -> None

Offer the host's render nodes; NVIDIA ones carry their device index.

Returns

None
funcrefresh_gpus() -> None

Keep the render nodes found at startup.

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, or its mirror, with the node's credential for it.

paramimage_namestr

Image reference.

Returns

typing.Any

The pulled image object.

funcprune_images() -> None

Remove dangling images left behind by pulls.

Returns

None
funcexport_web_client(image, path) -> bytes

Copy path out of a container of the image that never starts (see BaseProvider).

The archive comes through Docker's copy API, as docker cp takes it: a container's logs are not binary-safe, so nothing is run.

paramimagestr
parampathstr

Returns

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

Run the application container and wait until it answers HTTP.

See BaseProvider.launch for the arguments; volume keys are server paths and are translated to host paths here. With vpn, the container resolves names at the gateway and, once started, has its default route pointed at it by the helper (_route_through).

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
paramvpndict[str, Any] | None
= None

Returns

dict[str, typing.Any]
func_route_through(session_id, container_id, gateway_ip) -> None

Point a container's default route at its VPN gateway.

The helper is the gateway image run in the container's network namespace with NET_ADMIN, which the container itself never gets; the route it sets outlives it.

paramsession_idstr
paramcontainer_idstr
paramgateway_ipstr

Returns

None
funcstop(instance_id) -> None

Stop (and remove) a container.

paraminstance_idstr

Container id.

Returns

None
funcis_running(instance_id) -> bool

Tell whether a container still exists and has not exited.

paraminstance_idstr

Returns

bool
funcmanaged_instances() -> dict[str, float]

Return this server's labelled containers with their creation times.

Returns

dict[str, float]
func_get_container_ip(container_attrs) -> str | None

Extract the first usable IP address from container attributes.

paramcontainer_attrsdict[str, Any]

Returns

str | None