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.

Demo

asciicast

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.
  • Webhooks: Send HTTP POST notifications on job state changes and other events.
  • 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).

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. (Optional) Initialize configuration:

    gflowd init
    

    This creates ~/.config/gflow/gflow.toml with sensible defaults.

  2. 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.

  3. 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
    
  4. Check the job queue:

    gqueue
    

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

  5. 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.12.tar.gz (291.6 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.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

runqd-0.4.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: runqd-0.4.12.tar.gz
  • Upload date:
  • Size: 291.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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.12.tar.gz
Algorithm Hash digest
SHA256 d0a6a641da420b980fdaf9913cc2ab3f0b83faccf5627709d1e512c429203fd5
MD5 aa821271d966362e41aa9759e3b9e5cd
BLAKE2b-256 361ac341bfa0b6e67e8ffba1c65b8fff5ddeea606999598eaa3e51900398c674

See more details on using hashes here.

File details

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

File metadata

  • Download URL: runqd-0.4.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9bbdf9aff295e279ebf788d95ce54227218e60ea23c5dea166728e6ddcd925d1
MD5 c27478f79f7951497a6b9e035903a0c7
BLAKE2b-256 876046a39cfb684d3047779278412d702842fa7ea6804c65054bd65c434b9dc3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: runqd-0.4.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a11048a650f1f22e034271990ed6ed0c2a954834c65177f731cf860448746fe1
MD5 27c1f02054748bde387a247365a018d1
BLAKE2b-256 a42ef524762083575d2a7112a82d73d0022a30bbbd54c6246c18f8836c94fd62

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