Skip to main content

CLI and SDK for submitting and managing GPU workloads

Project description

Flow CLI & SDK

Python → Petaflops with one CLI. Flow procures GPUs through Mithril, spins up InfiniBand-connected instances, and runs your workloads with a compact CLI and SDK.

PyPI - Version Public repo

Background

There's a paradox in GPU infrastructure today: Massive GPU capacity sits idle, even as AI teams wait in queues—starved for compute. Mithril, the AI-compute omnicloud, dynamically allocates GPU resources from a global pool (spanning Mithril's first-party resources and 3rd-party partner cloud capacity) using efficient two-sided auctions, maximizing surplus and reducing costs. Mithril seamlessly supports both reserved-in-advance and just-in-time workloads—maximizing utilization, ensuring availability, and significantly reducing costs.

Infrastructure mode

flow instance create -i 8xh100 -N 20
╭─ Instance Configuration ────────────────────────────────╮
│                                                         │
│  Name           multinode-run                           │
│  Command        sleep infinity                          │
│  Image          nvidia/cuda:12.1.0-runtime-ubuntu22.04  │
│  Working Dir    /workspace                              │
│  Instance Type  8xh100                                  │
│  Num Instances  20                                      │
│  Max price      $12.29/hr                               │
│                                                         │
╰─────────────────────────────────────────────────────────╯

flow instance list
╭───────────────────────────────  Flow ────────────────────────────────╮
│                                                                       │
│     #     Status     Instance               GPU       Owner     Age   │     1    running    multinode-run        8×H100·80G  alex       0m   │
│     2    running    interactive-77c31e   A100·80G    noam       5h   │
│     3    cancelled  dev-a100-test        A100·80G    alex       1d   │
│                                                                       │
╰───────────────────────────────────────────────────────────────────────╯

Research mode (in early preview)

flow submit "python train.py" # -i 8xh100 Bidding for best‑price GPU node (8×H100) with $12.29/h100-hr limit_price…
✓ Launching on NVIDIA H100-80GB for $1/h100-hr

Quick Start

# Optional: install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install via uv or pipx (or see installer scripts in scripts/)
uv tool install flow-compute
# or: pipx install flow-compute

flow setup  # Requires a Mithril account, API key, and project access
flow dev   # Interactive GPU development after initial VM setup

Optional assistant integrations:

flow claude  # Install Flow skills for Claude Code
flow codex   # Install Flow skills for Codex

Why choose Flow

Status quo GPU provisioning involves quotas, complex setups, and queue delays, even as GPUs sit idle elsewhere or in recovery processes. Flow addresses this:

Dynamic Market Allocation – Efficient two-sided auctions ensure you pay the lowest market-driven prices rather than inflated rates.

Simplified Batch Execution – An intuitive interface designed for cost-effective, high-performance batch workloads without complex infrastructure management.

Provision from 1 to thousands of GPUs for long-term reservations, short-term "micro-reservations" (minutes to weeks), or spot/on-demand needs—all interconnected via InfiniBand. High-performance persistent storage and built-in Docker support further streamline workloads, ensuring rapid data access and reproducibility.


Why Flow + Mithril?

Pillar Outcome How
Iteration Velocity and Ease Fresh containers quickly once capacity is allocated. flow dev for DevBox or flow submit to programmatically launch tasks
Best price-performance via market-based pricing Preemptible secure jobs for $1/h100-hr Blind two-sided second-price auction; client-side bid capping
Availability and Elasticity Self-serve access to spot and reserved capacity, subject to account access and market availability. Spot capacity plus overflow capacity from partner clouds
Abstraction and Simplification InfiniBand VMs, CUDA drivers, auto-managed healing buffer—all pre-arranged. Mithril virtualization and base images preconfigured + Mithril capacity management.

"The tremendous demand for AI compute and the large fraction of idle time makes sharing a perfect solution, and Mithril's innovative market is the right approach."Paul Milgrom, Nobel Laureate (Auction Theory and Mechanism Design)


Key Concepts to Get Started

Core Workflows

Infrastructure mode

  • flow instance create -i 8xh100 -N 20 → request a 20-node GPU cluster
  • flow volume create -s 10000 -i file → provision 10 TB of persistent, high-speed storage
  • flow ssh instance -- nvidia-smi → run across all nodes in parallel

In research preview

Research mode

  • flow dev → interactive development on allocated GPU instances.
  • flow submit → reproducible batch jobs.
  • Python API → easy pipelines and orchestration.

Examples

# Launch a batch job on discounted H100s
flow submit "python train.py" -i 8xh100

# Frictionlessly leverage an existing SLURM script
flow submit job.slurm

# Serverless‑style decorator
@app.function(gpu="a100")

Ideal Use Cases

  • Rapid Experimentation – Quick iterations for research sprints.
  • Instant Elasticity – Scale rapidly from one to thousands of GPUs.
  • Collaborative Research – Shared dev environments with per-task cost controls.

Flow is not yet ideal for: always‑on ≤100 ms inference, strictly on‑prem regulated data, or models that fit on laptop or consumer-grade GPUs.


Architecture (30‑s view)

Your intent ⟶ Flow Execution Layer ⟶ Global GPU Fabric

Flow SDK abstracts complex GPU auctions, InfiniBand clusters, and multi-cloud management into a single seamless and unified developer interface.


Installation

Requirements

  • Python 3.10 or later
  • Recommended: use uv to auto-manage a compatible Python when installing the CLI
  • Linux or macOS for native CLI workflows. On Windows, use WSL2; native Windows is not fully validated.

1) Install uv — optional but recommended

Installation guide: docs.astral.sh/uv/getting-started/installation

  • macOS/Linux:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  • Windows: use WSL2 for the Flow CLI, then run the macOS/Linux command inside WSL.
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

2) Install Flow

  • Global CLI (uv):

    uv tool install flow-compute
    flow setup
    
  • Global CLI (pipx):

    pipx install flow-compute
    flow setup
    

Under the Hood (Advanced)

  • Bid Caps – Protect budgets automatically.
  • Self-Healing – Spot nodes dynamically migrate tasks.
  • Docker/Conda – Pre-built images or dynamic install.
  • Multi-cloud Ready – Mithril (with Oracle, Nebius integrations internal to Mithril), and more coming
  • SLURM Compatible – Run #SBATCH scripts directly.

Python SDK (Research Preview)

Advanced Task Configuration

# Distributed training example (32 GPUs, Mithril groups for InfiniBand connectivity by default)
task = flow.run(
    "torchrun --nproc_per_node=8 train.py",
    instance_type="8xa100",
    num_instances=4,  # Total of 32 GPUs (4 nodes × 8 GPUs each)
    env={"NCCL_DEBUG": "INFO"}
)

# Mount S3 data + persistent volumes
task = flow.run(
    "python analyze.py",
    gpu="a100",
    mounts={
        "/datasets": "s3://ml-bucket/imagenet",  # S3 via s3fs
        "/models": "volume://pretrained-models"   # Persistent storage
    }
)

Key Features Summary

  • Distributed Training – Multi-node InfiniBand clusters auto-configured
  • Code Upload – Automatic with .flowignore (or .gitignore fallback)
  • Live Debugging – SSH into running instances (flow ssh)
  • Cost Protection – Built-in max_price_per_hour safeguards
  • Jupyter Integration – Connect notebooks to GPU instances

Documentation: https://docs.mithril.ai/cli-and-sdk/quickstart

Further Reading

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

flow_compute-3.22.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distributions

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

flow_compute-3.22.1-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

flow_compute-3.22.1-cp313-cp313-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

flow_compute-3.22.1-cp313-cp313-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

flow_compute-3.22.1-cp313-cp313-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

flow_compute-3.22.1-cp313-cp313-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

flow_compute-3.22.1-cp312-cp312-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

flow_compute-3.22.1-cp312-cp312-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

flow_compute-3.22.1-cp312-cp312-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

flow_compute-3.22.1-cp312-cp312-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

flow_compute-3.22.1-cp311-cp311-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

flow_compute-3.22.1-cp311-cp311-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

flow_compute-3.22.1-cp311-cp311-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

flow_compute-3.22.1-cp311-cp311-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

flow_compute-3.22.1-cp310-cp310-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

flow_compute-3.22.1-cp310-cp310-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

flow_compute-3.22.1-cp310-cp310-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flow_compute-3.22.1-cp310-cp310-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file flow_compute-3.22.1.tar.gz.

File metadata

  • Download URL: flow_compute-3.22.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.0

File hashes

Hashes for flow_compute-3.22.1.tar.gz
Algorithm Hash digest
SHA256 bd5ee54e8eb3151129257c36659d08ec75077fb30e507bbc9ceea52710adc135
MD5 569cc293c1b3fcc3e95ec6f132621ba9
BLAKE2b-256 1a8e8b94833a527ad173144959ff301eefcefbc8c4ff6f2d50daa82894f911fb

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97893b46c100edb2cda2dd2a3875eb1949a17c0baf112d4e63de430c57ec447c
MD5 c849b715ca4448e8e688c42230f687b9
BLAKE2b-256 530982a34268f2587547903d5947d43d7f3f3b57c3ba9811ca6696cf5675c61d

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bf9bf7b09f286c59f1ce1777b42c542aab46dfd8133fd8bc3aa56db951864c1
MD5 009826abde9ceb22515468f91bf2fb6f
BLAKE2b-256 5d20851fe1d1e5d0d0a57dd2d23bab1f6135789307f4bfbad453042e3aa41e00

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5f3f4107a0929660a98e89b849780b4fc5f279ba89b9155c1399b98660ddd1bc
MD5 294f8348451723aa27148074b1f1c48f
BLAKE2b-256 0e5ba75a823bd3ba19a02fd416b82e9d1e1a5e6a92060d9a2ce301725a644b15

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff3ffc5cadacd5b58d84c3a987b34b7bc50485194df11cf3df855123d2a8e831
MD5 b4e63ee9025a93b8b6ef0c85b16d7a43
BLAKE2b-256 206fa86d09765963cc5a851cb0826e4b374c0d7d76b00c42749ce7f4722b5bbf

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0b8d0fee479354d24aabbcac05d049d55f6e4ca0cf178bcdf74af08ec1da6b70
MD5 10f039124502b3c60a7c9b71671b79a6
BLAKE2b-256 f3d2083e9ebbe132df080785db65b43e06fa7fe6dc671d07722623ad824ad57c

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1be512e38e86f0761d71d52c96d0bc99bded36608d394b2613b242d52385da56
MD5 4534b40f2603c03d9c304ee501df39d8
BLAKE2b-256 39b1c16e3a133a813f1a31bf186687b31edf3571eeb54400978ac26ec4d596fd

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b9d5707a019b9d160ae8bda066352ed89023f5f40ab5be4b36d9b19622f53df1
MD5 feab4c5d5b44d2bd49d4266b9a472626
BLAKE2b-256 317ef6b35ea0915400663e6925c39a3b1a5f959e917b9824fc672bbff05e73f8

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da3150b41f963747ef764ecd82f30bf1fcf110942ec890e76ac05e6744fbcaeb
MD5 0bb1976970e85fa1ffd2c5acc13e89e2
BLAKE2b-256 a4c10c45f8229a7d1674e43ecbaeb6f0a4ae61241637d9d65fb40572b20a3282

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 39a353616f2d083e334ace9a06add95c5ddf346d45a964d1cd191d2ec507c5e6
MD5 a43ace811abf667ae698eefaadb41c16
BLAKE2b-256 d1c44eb6a80f6a2961c08fec70d1589bdab2a4659fddcddb6867f2fa417bf328

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 411798db9347c2e123474ad245543e56606b9909358bbada71a74d27d5c9d91b
MD5 ac8fc87baeeb815ce968f03084be9c2d
BLAKE2b-256 aea89888e91cd6fbccb9f9560ff2718f7036fde51ac6ff80d8bf1cd9942bc5ba

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4aa7b2447168147250da24ebda49bcdb76349fbcc5ae6106c5567a9dc5bc2a0d
MD5 a6fa9c3923a53881c5b789ecee4d760b
BLAKE2b-256 2207dadf4c691276b0ad1f2091ee53192ee7bf07d96717ea394f378f473f584c

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bee47c8dfc6a783a35707037eab02a43ac44c4529c4271fd32643e02e87300dc
MD5 7e3333b6a016e6a42214d2cd86c058c8
BLAKE2b-256 e87a8fa71f247509731f814fc94469551490f65f567e64f4269df7f918dfb311

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4046cddc046b1f7f0b6270c373d64be9ba948d52a8b358e17264b558a3654ee3
MD5 9749dac11d87357d26e2c3d00c5ce6fb
BLAKE2b-256 8c2715de05f67bd58df5f6d69ac1b78c9bc1db9d0de21bb0bba2ce414ec4658b

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0cbecdfdcedef0671a2d26cae2736ead4a535c1f5222f9f0288d2f0c539dd103
MD5 5f7b68ef516c205f5106d8a3e86e5e34
BLAKE2b-256 3631d07899607672bad31e9baa898d35a9193d86964be9214b7a7ccf1680c58d

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 22beb64edd37b8a91f0541c4434d713076370cb14b73cdd7670da02416ec849b
MD5 307120b63f2a198ad7304adc4bcbdb56
BLAKE2b-256 40ec4a1917cd2c05490851725f820d99999d99f25317347a02df3be09ecf76bc

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01b1a34e26f99e0a96bbf9b306c2657849ebcf48eb7acacef7325aa27776599e
MD5 33a2961ae5a9a32690b5ef0bd095d1ab
BLAKE2b-256 0962aaa8a44001c97cb593cae934887b46e2cc81079607bc698c20ae48a8387e

See more details on using hashes here.

File details

Details for the file flow_compute-3.22.1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.22.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 769b0cae56d3b067fdf8bcb0607b186ce1393b9dfc018c8a7cd27d70e3196af0
MD5 f95f31ea72478403cd6a64700e744b7b
BLAKE2b-256 c0781dfb93c487c5604eacf961bed5bba5ddce082a83c9ff34c8d3ded8beed9d

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