Skip to content

About

Python SDK for flux batch jobs and services

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

flux-batch

Python SDK to generate Flux batch jobs and services

PyPI - Version docs

https://github.com/converged-computing/flux-batch/raw/main/img/flux-batch-small.png

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/

Quick start

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.py
import 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.

License

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

About

Python SDK for flux batch jobs and services

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages