Python SDK to generate Flux batch jobs and services
flux-batch builds Flux batch jobs from a list of commands, wraps them with prologs, epilogs and services, and submits them. Modules deploy something across every node of the job before your work runs, such as a user space Kubernetes cluster with usernetes.
📖 Documentation: https://converged-computing.github.io/flux-batch/
Inside a Flux instance (flux start, or an allocation with FLUX_URI set; see the
installation docs):
flux python -m pip install --user -e .
flux python my_script.pyimport flux
import flux_batch
batch = flux_batch.BatchJobV1()
batch.add_job(["echo", "hello from flux-batch"])
spec = flux_batch.BatchJobspecV1.from_jobs(batch, nodes=1, time_limit="10m")
print(flux_batch.submit(flux.Flux(), spec, dry_run=True)) # preview
jobid = flux_batch.submit(flux.Flux(), spec)See the examples directory for more.
HPCIC DevTools is distributed under the terms of the MIT license. All new contributions must be made under this license.
See LICENSE, COPYRIGHT, and NOTICE for details.
SPDX-License-Identifier: (MIT)
LLNL-CODE- 842614
