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.9.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.9-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

flow_compute-3.20.9-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.9.tar.gz.

File metadata

  • Download URL: flow_compute-3.20.9.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.9.tar.gz
Algorithm Hash digest
SHA256 e5e97d4a01edff2fe037fd3090779462005bc5a4da84db033e8c438997cf4d69
MD5 fc977fa141ea4a81e82e44278991a978
BLAKE2b-256 b67d34a09251fd5e2ad98ff0d7c2cc7c3b75aa310d5936c88fd124165311f8a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-py3-none-any.whl
Algorithm Hash digest
SHA256 42ec2a3ea916f9d6d226dd9e5ed70e0c8e4e19bd9215b247931d25b94db85301
MD5 dfbc2eab6fbe32cbca9907dd03ea2aa1
BLAKE2b-256 08ec04380d0b6b3ecf88d74600fa83ddf9df3574016c352047b78ad13baee6bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 97a8948f1699f4abc967a154b8aefb7526e20a79409f95f19cff50e5c4f29b0b
MD5 490bdc768ec61fe11ef3b7ede02f07a0
BLAKE2b-256 111341b74e383d6db5947f166e8b0c85d672f2407f9b57e73120dcef7f97247c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 12131bab3455e443af254024057ebc16669485560fd4f8fa93f0a9ac2488f8bf
MD5 95106c0e4ba48587d78160dc3b87e9d6
BLAKE2b-256 4408efd895a31ef2af0fcace8406a53d164c877fea84f5fac39d95a583618a13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eeec0776e00bd92928f18b5f9fea80b31d40f8573e48a303ad6a0c23055a9819
MD5 3054c97afce571eaaaaa34ad98d4780a
BLAKE2b-256 9b9ed9c1aecae84f8dadfcbee8975a5ba8baadd623e4e8e9099e89da4afd22f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1a9b677089683da817996cd2834efb1cdb89038106809c1f0995882cffa3505a
MD5 ac968dcaa9f8386a610382c4d6c68283
BLAKE2b-256 3ee0af4031a387a1b723c1bdc062d15c6428474bd6857d7a38363f85dee6eb0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50eea03b46ca780d99206afaaca1a4a10015dac9f37b61f3eaeac1817e6604f6
MD5 c997b7cd17057a91a16d49b0c8768092
BLAKE2b-256 7a427ac9c761a5a0a993b181884f1b1fcbc553afdbbe55ff8e2437b48de62b1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4a4047acea72229c8fc3a5dc3ad732fc9e46e75dec9de5570f9c23c74bcf6cea
MD5 093059cc8e334572cfd59b386fcfa107
BLAKE2b-256 378e5677d16fb52a0cee7f84c075f1fae9e59e588d25a7c6cb1a06c6e1de9402

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad4997bdc375b08fed35b1b364deb8f1cf3c7dac387a2e47cfa12035fbbbda19
MD5 c2a0bdc15d76c94fa7c9e517b4f7992f
BLAKE2b-256 9adf353680f883a78546825a2a35e0f71516ec744b8716f8494e97e3793ce6b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4fc3bab217e424c1f43a0bb6c02587905f649e9407c9c8fad9e49a63cb1b94c7
MD5 c973254a8e0607221f2e208d5968575a
BLAKE2b-256 18622639a796c9624cb4119c2b7f47c1e753499c76784ed22fb075510c7ff527

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e307ca36337416c2609ab687b1cd67409c2aee0d504813f5ba67c80684b54a47
MD5 a0d81704027113a7b8458a00fea60171
BLAKE2b-256 cab5cf9950e1f7a58be270f73ec93938adafbd5a5a0b6298ff3cd32c5fe924f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0734437bacba07411116f62054e49ad8180ff85b03a420f71201e055572e3355
MD5 b39e484c8bef8af6c2def81dd6823f68
BLAKE2b-256 ad83f127c879867bf42c72de96125e876ce526ffe45950e1fdbb4dc1d12e7be5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dbd42cd2b6c5e619425e0ed2efbcaeb7ecbfa34516ad716cad46ad8a4c6cad8f
MD5 aba854e25d72c2efc5a9a3006d9f8a85
BLAKE2b-256 18128ff2d77c71d04b190569f5a7976e21e0f5eaa9484d778e6e3df266741c98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5f3f05b0f5ca5ef24002dbf97e4b3352d8d3cc8267147e9020678b3ef188cd07
MD5 5c1d8f9bc846f78d492e4f2710753070
BLAKE2b-256 fa4b7a9efb4c53c304b6f6a43fb62ada0f3f65a09e4a37d1c57258d04bfdcb2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb1ce45d2bd0382a324a4ea9a0941edeff565be12b1bf790cd411b4b0210f158
MD5 16a7e6e4a9d66ab81ceed1a9a0501c4a
BLAKE2b-256 9f9d7d65f7bfe91321b5d132894c20b8f54209b28dbc54be5d67166aff6476ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 456d178cf6d7c908397a3ae89993369c914f983da89154917c862234c561ff9a
MD5 7a070cb406417fb3f78fe874c631ffec
BLAKE2b-256 6290daae02101997989b66490214f86cbdeb1de004cd90f0fa8b4dc6c94f2f5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2a22721d5286d6c13fc4c3c874bc5cf40a98c8fa0e292c97ad814c279f64c3c
MD5 c7fa27cfe9da7ab134787534412ec046
BLAKE2b-256 c661eb7537b17640623dc8f21747e73ed1668688fe56243a8978684d2e615888

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.20.9-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dc7aa56522af8fb946244b6ef6b6d91e81c9429068436a37de496b41bf565a97
MD5 1b11d8378abad32865ec40eaa729c9b9
BLAKE2b-256 7d2faa1d0e1697a97c4d349ce83ae94d03fa3bcbd10e020933fe0468ead083b2

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