Skip to main content

ray-vast

Run a Ray cluster with the head on AWS EC2 and the workers on vast.ai. You keep the normal Ray workflow. Only the cluster commands change: ray-vast up, ray-vast dashboard and ray-vast down.

Documentation (WIP): https://duc-ph.github.io/ray-vast/

Why

Usually, all nodes of a Ray cluster come from one cloud provider, such as AWS, GCP or Azure. The nodes are in one private network. In this network, they communicate simply and securely.

vast.ai is a market with cheaper GPUs. But vast instances have many constraints:

  • An instance is not a VM. It is a container on a host machine. Many renters (co-tenants) can share one host.
  • The instances communicate over the internet, not over a private network.
  • An instance can stop at any time. Its IP address can change.
  • The number of ports and the number of processes and threads have hard limits.

What ray-vast does

  • It implements a Ray autoscaler that works with these constraints.
  • It solves the communication between the nodes over the internet.
  • No critical endpoint is accessible without credentials. All traffic is encrypted. Co-tenants on the same host cannot read it.
  • It evaluates the Ray libraries on vast: Core, Data, Train, Tune, Serve and RLlib. The results are in the table below.

The vast host has root access to the worker container. Read the security model before you use private data.

Ray libraries

Library One worker Many workers What to know
Ray Core ✅ ✅
Ray Data 🟨 🟨 Write the output to a cloud bucket. A local output path stays on each worker.
Ray Train 🟨 ❌ Write checkpoints to a cloud bucket. Training across workers fails behind the NAT of vast. Use one worker with many GPUs.
Ray Tune 🟨 🟨 Write checkpoints to a cloud bucket.
Ray Serve ✅ ✅
RLlib ✅ 🟨 Put all learners on one worker. Learners across workers fail behind the NAT of vast.

✅ works. 🟨 works with an extra change. ❌ the main use fails.

Install

pip install ray-vast "ray[default]==2.59.*"

Keep the Ray pin: Ray on your laptop must match Ray in the cluster image. Then follow Getting started.

Documentation

Status

Tested with Ray 2.59.

Contributing

Read CONTRIBUTING.md for the tests and the docs build.

License

MIT. See LICENSE.

Metadata

Release files for ray-vast 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ray-vast 0.3.0
File Size Uploaded Provenance
ray_vast-0.3.0.tar.gz 292.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ray-vast 0.3.0
File Interpreter ABI Platform
ray_vast-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 358.1 kB

Release files / ray_vast-0.3.0.tar.gz

Download URL ray_vast-0.3.0.tar.gz
Size 292.5 kB
Tags Source
SHA-256 checksum
How to use checksums
168264dc7d6a168bf07db48f6f4552581459e13d79e71410ba984f086f27a9f9
BLAKE2b-256 checksum
How to use checksums
9d5ddb3413cd7754834f7dadec6af1c161100c7cd5036f7674e39e7957fe4738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / ray_vast-0.3.0-py3-none-any.whl

Download URL ray_vast-0.3.0-py3-none-any.whl
Size 65.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5bbc62b7796b287bde8dcc3289fa2d10c4a0b88eef90a043b47741c5ff6056b
BLAKE2b-256 checksum
How to use checksums
b07bc964a92a2683d7f14588a16a192102b5e1e7fe4badae178cd28430fbcfe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for ray-vast 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page