Skip to content

Mount go/launch

Set launch.image to go/launch's image, pinned by digest, and make the job's command /opt/launch/launch train. The adapter delivers the binary by the route publish.via names, so a cluster that mounts the publish image as a volume mounts go/launch the same way.

{
  "namespace": "team-a",
  "probeRuntime": {"kind": "ClusterTrainingRuntime", "name": "torch-distributed"},
  "publish": {"image": "registry.gitlab.com/phpboyscout/go/dispatch/publish@sha256:<64 hex digits>"},
  "launch": {"image": "registry.gitlab.com/phpboyscout/go/launch/launch@sha256:<64 hex digits>"}
}

The image is registry.gitlab.com/phpboyscout/go/launch/launch; take the digest from the release you want. go/launch runs as the pod's agent on Kubeflow, so the runtime has to be a torch runtime, which sets the PET_* variables it reads.

The init container route

Under publish.via: initContainer the runtime must define a second init container, named dispatch-launch, beside the publish one. The adapter adds an emptyDir at /opt/launch to it and sets DISPATCH_LAUNCH_DEST=/opt/launch there; the init container copies the binary into that directory.

  • go/launch's image cannot copy itself. It is FROM scratch, with no shell and no cp, so the init container's image needs a copy tool and a copy of the binary.
  • launch.image is not what runs on this route. A runtime patch cannot set a container's image, so the runtime's own init image runs, and launch.image is only checked for its shape.
  • publish.initContainer must not be dispatch-launch. The two would share a name, and the adapter refuses the settings.

Start refuses a runtime without the dispatch-launch init container, because Trainer would accept the patch and leave the job holding quota with no pods.

Things to avoid

  • No credential may be mounted at or under /opt/launch.
  • Leave the node container's terminationMessagePath alone. go/launch writes its cause document to /dev/termination-log, and a runtime that moves it is refused.
  • Give the pod enough grace to save. go/launch refuses a checkpointing job whose terminationGracePeriodSeconds is under 11 seconds with a POSIX checkpoint root, or 18 with an s3:// one, unless the job sets signal.grace: 0s and relies on its periodic saves.

Configuration reference lists the launch key.