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.20.10.tar.gz (1.6 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.20.10-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

flow_compute-3.20.10-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.20.10-cp313-cp313-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

flow_compute-3.20.10-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.20.10-cp312-cp312-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

flow_compute-3.20.10-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.20.10-cp311-cp311-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

flow_compute-3.20.10-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.20.10-cp310-cp310-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

flow_compute-3.20.10-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.20.10.tar.gz.

File metadata

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

File hashes

Hashes for flow_compute-3.20.10.tar.gz
Algorithm Hash digest
SHA256 25bce8dd90d9e495e888fc889b4f6dafc9545bf417fac6aa2d55be3b182773a9
MD5 dca9a81c984ebf7e16e36647e311f3ed
BLAKE2b-256 1cf832a9a132ccb76a5cdcee1472ac905d5e2247e925054f7d49de92d71e1d7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-py3-none-any.whl
Algorithm Hash digest
SHA256 1bb25e828fa610f3be0c29e0821b6cdeb3380d776b2fc9506378da3aea2cea75
MD5 6f645dcce7e4dafabaea9d6a9602095e
BLAKE2b-256 be45e8e00d02bb63e5c0268673ce2de35780333a74a8373a22f0ee40015a7afd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94e8a4dc0232980cbc71bff641eac23280310065bce1806295d582f4d66cded4
MD5 0f67eceb411dabc7830c8d5c0e200e5f
BLAKE2b-256 e0abdad3455b264f5d87095f7dab5ec589192b7420dd50f3e56da7ca3c77f656

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1fff32d51b3353c8313bd9953e82f7d0b11fb89aa05a093f7e37f9b0900ca884
MD5 d58161881d683a592fd2aeaadd592d41
BLAKE2b-256 635583c2407cdeec868b1f574796d558a50ee8c559b8b259ea7f9c645f9775c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8641a1e1bf93266dd47d02c9b0a333bb5bd5d029646daf430d0c90a3de975253
MD5 2c274e71d3538b5a2fe70a8f2e655cd0
BLAKE2b-256 2e4dd427b2de443a2acf2b709cd6652c420bb9c91b10d7fceb9cda4d897e844a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 395dd494a5f7a86512628d69837b42287717dfcd95b86683d3ffd258289ce811
MD5 0754b9d27402e49e1f9af4a9e670aa42
BLAKE2b-256 3e21040fd1e205228fb1d05231acdf0492b4d455cc0c715e58bacfbe932e305d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 882626ab00b0e384a748ae20ec6ccc855527b74fe0edd1218c0bc6b980f85dbf
MD5 86476379c73ccbed5213c5574f213050
BLAKE2b-256 b658e681d2b3b29f71a6cf29009a3555015022b173d7665a4f689f746ee4b894

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5803c8e9ce27f383373dbdda1b7c49299bfa82a8a5cd0b9607dbad9577a40e97
MD5 02e073ffe55c6479281f4d7f21eb3358
BLAKE2b-256 3329a5431b2ad33c2d735873ce29ae79d600fd884d13a5c1395cbad332ea62ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97c7192013123dd47b9f864d452195d85d71b506e6786e37d74612949c4e208c
MD5 ad530a3b34338c023084c3599ecfcb11
BLAKE2b-256 db089e758b7477fe28ab90b6a63a8deaaae1fca593a07e327dd4f5ccc7a42a1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 136f16375faf8b9c96a57d3c1748bbb4477109d90a12744457efb30a85722481
MD5 a725b6c30cde4d386b71f5d4ce4a3a21
BLAKE2b-256 ca25aec3e39198cc1c04df9c6fda967f481d94b00b83bd01c4a4a013c0dfb936

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b50d1c3e664af6b5dabad81a7baeb221dc94bdf0e8768e2fe424a0b57c7335d
MD5 55ec2fae0fc043ba4ad91f2a153b03b4
BLAKE2b-256 3c791ec245e0174234d6d2664ae8cdb50a92b235ee6cf06572a08d0be450012c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 babbd1b41b2e7520cbb9b30ede5c46d156fa2e1edbd03048b2261e9562583d62
MD5 aa32f8514e80426fc3b43da231c9027d
BLAKE2b-256 07cd7af2cf958724386c0975bab1c9f60d3f7105daa62eef00fac782ecf591e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b018a8fe8c1d484d748951222b338ba791ee78da675f8bb18ff298528458879
MD5 a322cabb0a5af1f3bd82490377c1a492
BLAKE2b-256 4697e6095ea2195b1a6d9e04098a8e274dc21f9dcc2c4012eb73d22ac8d25e92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dcc4f9790ef634ce2c79170e01cf4715339f25570b7333b71b362edf639a866e
MD5 6137fcb3e64fecbb1d14069068233e8f
BLAKE2b-256 c21526fea1102790c67f4bfc06a60c548d888b22dd0604cc693b86f9dc7261c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 31b536916cf30849ce071155bc6ae4f0f20f4a525eb7c9f90e3007ca40b288b5
MD5 7e61401489373ec16f39960a3369e9b9
BLAKE2b-256 4874951397a90fdf07196dbb7d7a51b8a2a2262ae8ddfd9a8cb8fe91305ebba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 62419e7253cacfa1d046ee9f3ff5a2b8c4e7697c9ec3101cc2333bcfde9592f2
MD5 39d24f736317d9779d85de59239d404a
BLAKE2b-256 4c61e2d64930e9ceedb471fed3a5e55d4dbf2aeb668ff995be0b0e23792f4bc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e91c4a34979529859abaf2f1af03e5af879536bb66d11dcd3dcfef74fe00edc
MD5 7ee1f4412a69217e1ed89b7b5dc8af3d
BLAKE2b-256 49596856895a7959335d0e2e6e8198402a587163016c22e65eb57fb9907a8df6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.10-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a82caadb0e713b43193505edbb1721c94ba2839fa2864166f447a758515f83ec
MD5 1c0e32e3fc8df8f2d49cd96737edcce1
BLAKE2b-256 a163844da1e395056205280d7bda69bfbd1b776ff78eb6fe3584fa40c8c931c1

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