Skip to main content

A lightweight, single-node job scheduler written in Rust.

Project description

gflow - A lightweight, single-node job scheduler

Documentation Status GitHub Actions Workflow Status codecov PyPI - Version TestPyPI - Version Crates.io Version PyPI - Downloads dependency status Crates.io License Crates.io Size Discord

English | 简体中文

gflow is a lightweight, single-node job scheduler written in Rust, inspired by Slurm. It is designed for efficiently managing and scheduling tasks, especially on machines with GPU resources.

Core Features

  • Daemon-based Scheduling: A persistent daemon (gflowd) manages the job queue and resource allocation.
  • Rich Job Submission: Supports dependencies, priorities, job arrays, and time limits via the gbatch command.
  • Time Limits: Set maximum runtime for jobs (similar to Slurm's --time) to prevent runaway processes.
  • Service and Job Control: Provides clear commands to inspect the scheduler state (ginfo), query the job queue (gqueue), and control job states (gcancel).
  • tmux Integration: Uses tmux for robust, background task execution and session management.
  • Output Logging: Automatic capture of job output to log files via tmux pipe-pane.
  • Simple Command-Line Interface: Offers a user-friendly and powerful set of command-line tools.

Component Overview

The gflow suite consists of several command-line tools:

  • gflowd: The scheduler daemon that runs in the background, managing jobs and resources.
  • ginfo: Displays scheduler and GPU information.
  • gbatch: Submits jobs to the scheduler, similar to Slurm's sbatch.
  • gqueue: Lists and filters jobs in the queue, similar to Slurm's squeue.
  • gjob: Job inspection and control (logs, attach, update, redo, ...).
  • gctl: Daemon/runtime control utilities (e.g. GPU restriction).
  • gcancel: Cancels jobs.

Installation

Install via PyPI (Recommended)

Install gflow using pipx (recommended for CLI tools):

pipx install runqd

Or using uv:

uv tool install runqd

Or using pip:

pip install runqd

This will install pre-built binaries for Linux (x86_64, ARM64, ARMv7) with both GNU and MUSL libc support.

Install Nightly Build

To try the latest development version, install from TestPyPI:

pip install --index-url https://test.pypi.org/simple/ runqd

Install via cargo

cargo install gflow

cargo install(main branch)

cargo install --git https://github.com/AndPuQing/gflow.git --locked

This will install all the necessary binaries (gflowd, ginfo, gbatch, gqueue, gcancel, gjob, gctl).

Build Manually

  1. Clone the repository:

    git clone https://github.com/AndPuQing/gflow.git
    cd gflow
    
  2. Build the project:

    cargo build --release
    

    The executables will be available in the target/release/ directory.

Quick Start

  1. Start the scheduler daemon:

    gflowd up
    

    Run this in a dedicated terminal or tmux session and leave it running. You can check its health at any time with gflowd status and inspect resources with ginfo.

  2. Submit a job: Create a script my_job.sh:

    #!/bin/bash
    echo "Starting job on GPU: $CUDA_VISIBLE_DEVICES"
    sleep 30
    echo "Job finished."
    

    Submit it using gbatch:

    gbatch --gpus 1 ./my_job.sh
    
  3. Check the job queue:

    gqueue
    

    You can also watch the queue update live: watch --color gqueue.

  4. Stop the scheduler:

    gflowd down
    

    This shuts down the daemon and cleans up the tmux session.

Documentation

  • Website: https://andpuqing.github.io/gflow/
  • Installation: docs/src/getting-started/installation.md
  • Quick start: docs/src/getting-started/quick-start.md
  • Job submission: docs/src/user-guide/job-submission.md
  • Time limits: docs/src/user-guide/time-limits.md
  • Configuration: docs/src/user-guide/configuration.md
  • Command quick reference: docs/src/reference/quick-reference.md

Star History

Star History Chart

Contributing

If you find any bugs or have feature requests, feel free to create an Issue and contribute by submitting Pull Requests.

License

gflow is licensed under the MIT License. See LICENSE for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runqd-0.4.11.tar.gz (285.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

runqd-0.4.11-py3-none-musllinux_1_2_x86_64.whl (13.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

runqd-0.4.11-py3-none-musllinux_1_2_i686.whl (13.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

runqd-0.4.11-py3-none-musllinux_1_2_armv7l.whl (12.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

runqd-0.4.11-py3-none-musllinux_1_2_aarch64.whl (12.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

runqd-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

runqd-0.4.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (13.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

runqd-0.4.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (12.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

runqd-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (12.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

File details

Details for the file runqd-0.4.11.tar.gz.

File metadata

  • Download URL: runqd-0.4.11.tar.gz
  • Upload date:
  • Size: 285.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11.tar.gz
Algorithm Hash digest
SHA256 09087fd1e775fa25ef79ac93d5fd04548c79241bbcdb6141326171f2c3c3d9c7
MD5 91117c1af9a88a7ca309f9cd573fe728
BLAKE2b-256 b4894948ff56da7752fcb2fe4cfa760dcd2945923a05a4ee7f7117a4f813b0e1

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 13.9 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1fb6dda2f6879140bfae1f4c16001e780aab96a29d25a242003429cbd0488a0a
MD5 2b4903e0c4a8f1b29848d7df47c081b5
BLAKE2b-256 782bc5ee48ed9f7a788eb3e6ea81a24c27684668c9cd84829ac7ec09401079a0

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-musllinux_1_2_i686.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: Python 3, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 3ee5f466f0bc4c7d84e20d213b514509ea39fc41c3a22cdf779c2231bba0ebcc
MD5 8499baa8e7f9e05de8b7f6232205d62b
BLAKE2b-256 e2e36634ab53fb86e4b904ce51a2e36b26ce215185d70461d783463f82c37b4b

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-musllinux_1_2_armv7l.whl
  • Upload date:
  • Size: 12.4 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 ba066ac04969d20d8fcd906a282d23895f4672c370d90b3c9aba19630f850e7e
MD5 2b427072d97ba2302f58e1edf19324b8
BLAKE2b-256 27814e2f6404f849cdfcdef04645795f46d9fae28b5d7a8756380f8781fd1c60

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 12.5 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4f339722172027cc163e38f4888f32197cd1b26b6870bbea73d1e7c38aeaa273
MD5 74200d5488a66bd06bcc2e0367d430da
BLAKE2b-256 d8c518d07f35b6976478302157490e4313312331f7e7c830d6db1816fadbd888

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 13.3 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1084766d0c9658e28d4fda9e7eda3aa396f41a26ea5ad86d3b563b986b2dfe21
MD5 2dac00975d645863f6cfc194afa8d61d
BLAKE2b-256 2f86f879cf7705c5a9ee7880e6a17fa594face23af366fd4f0b9c4bf87bb7040

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3c0db5a5dad9a6f87cef216a998677ba072456a15c9c556a67513e9c436f77ce
MD5 df749c30b2240c572cc0c396903bfad6
BLAKE2b-256 845bb8801f93e3396da0bcbd203abf83ff7b4cd3cdd083e42d7697f94bd40e2f

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
  • Upload date:
  • Size: 12.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 36b292940a479d7823bcc508b3d2a2cad022ef1bc1dd83e0685214a357fb61f9
MD5 3f991beb6131609ad609dc5052627c18
BLAKE2b-256 242bfe9b78b46fa12b9a2dc0df6ca2e95b8c60651cc1e3af0c8ffd3f992f9c89

See more details on using hashes here.

File details

Details for the file runqd-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: runqd-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 12.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for runqd-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 44eb1098fbb37fbc4a8e125cfa84fba59b416deeb2dbeba1f67dacfc7601b2c1
MD5 29d9f6543e54a2f49b19d490c0dbe22a
BLAKE2b-256 80bdc20b35208c24e3028b2b79262c71592ff8d146f5cc6b42bd2885f327ff24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page