runtraj.execution.kubernetes.job_manifest#

runtraj.execution.kubernetes.job_manifest(name, project, execution, n_tasks, *, output, input_hash, fetch=False)[source]#

Return the indexed Job that runs a project in n_tasks pods, as a Kubernetes manifest.

Its name is runtraj-<name>- and a suffix Kubernetes picks, so a project can be submitted again. Each pod runs pod_args(), with the resources, volumes, secrets and service account of execution’s kubernetes block, an emptyDir at SCRATCH as its TMPDIR and one thread per worker (OMP_NUM_THREADS=1). The exit code rules are in this module’s docstring.

Parameters:
  • name (str) – The project’s name, for the Job’s name and labels.

  • project (str) – What the pods open: the URL of the inputs, or the project folder’s path on a volume they mount.

  • execution (ExecutionConfig) – Settings with a kubernetes block.

  • n_tasks (int) – The Job’s completions.

  • output (str) – The output directory the pods write to.

  • input_hash (str) – runtraj.execution.inputs.hash_inputs() of the inputs submitted.

  • fetch (bool) – Each pod first gets the met files, one pod at a time (pod_args()).

Return type:

dict[str, Any]