Skip to content

Commit

Permalink
update readme (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
mernit authored May 10, 2024
1 parent 4b4a143 commit 4366c6e
Showing 1 changed file with 92 additions and 52 deletions.
144 changes: 92 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

---

### **Ultrafast Serverless GPU Runtime ✨**
### **The Open-Source Serverless GPU Container Runtime ✨**

<p align="center">
<a href="https://docs.beam.cloud">
<a href="https://docs.beta9.beam.cloud">
<img alt="Documentation" src="https://img.shields.io/badge/docs-quickstart-blue">
</a>
<a href="https://join.slack.com/t/beam-89x5025/shared_invite/zt-1ye1jzgg2-cGpMKuoXZJiT3oSzgPmN8g">
Expand All @@ -33,25 +33,110 @@

# Beta9

Beta9 is an open-source platform for running remote containers directly from Python. It supports GPU/CUDA acceleration, allows you to scale out arbitrary Python code to hundreds of machines, easily deploy functions and task queues, and distribute workloads across various cloud providers (including bare metal providers).
Beta9 is an open-source platform for running scalable serverless GPU workloads across cloud providers.

Features:

- Scale out workloads to hundreds of machines (with GPU support!)
- Scale out workloads to thousands of GPU (or CPU) containers
- Ultrafast cold-start for custom ML models
- Instantly run remote containers, right from your Python interpreter
- Distribute workloads across multiple cloud providers
- Easily deploy task queues and functions using simple Python abstractions

We use beta9 internally at [Beam](https://beam.cloud) to run AI applications for users at scale.

## Use-Cases

### Serverless Inference Endpoints

```python
from beta9 import Image, endpoint


@endpoint(
cpu=1,
memory="16Gi",
gpu="T4",
image=Image(
python_packages=[
"vllm==0.4.1",
], # These dependencies will be installed in your remote container
),
)
def predict():
from vllm import LLM

prompts = ["The future of AI is"]
llm = LLM(model="facebook/opt-125m")
output = llm.generate(prompts)[0]

return {"prediction": output.outputs[0].text}
```

### Scale out jobs to hundreds of containers in parallel

```python
from beta9 import function


@function()
def square(i: int):
return i**2


def main():
numbers = list(range(100))
squared = []

# Run a remote container for every item in list
for result in square.map(numbers):
squared.append(result)
```

### Run async tasks in a queue

```python
from beta9 import task_queue, Image


@task_queue(
cpu=1.0,
memory=128,
gpu="T4",
image=Image(python_packages=["torch"]),
keep_warm_seconds=1000,
)
def multiply(x):
result = x * 2
return {"result": result}

# Manually insert task into the queue
multiply.put(x=10)
```

## How it works

Beta9 is designed for launching remote serverless containers quickly. There are a few things that make this possible:

- A custom, lazy loading image format (CLIP) backed by S3/FUSE
- A fast, redis-based container scheduling engine
- Content-addressed storage for caching images and files
- A custom runc container runtime

![demo gif](sdk/docs/demo.gif)

# Get started

## Beam Cloud (Recommended)

The fastest way and most reliable way to get started with Beam is by signing up for free to [Beam Cloud](https://beam.cloud). Your first 10 hours of usage are free, and afterwards you pay based on usage.
The fastest and most reliable way to get started is by signing up for our managed service, [Beam Cloud](https://beam.cloud). Your first 10 hours of usage are free, and afterwards you pay based on usage.

## Open-source deploy (Advanced)

You can run Beta9 locally, or in an existing Kubernetes cluster using our [Helm chart](https://github.com/beam-cloud/beta9/tree/main/deploy/charts/beta9).

### Local Development

#### Setting up the server

k3d is used for local development. You'll need Docker and Make to get started.
Expand Down Expand Up @@ -80,37 +165,6 @@ make setup-sdk

After you've setup the server and SDK, check out the SDK readme [here](sdk/README.md).

# Example App

```python
from beta9 import function


@function(cpu=8)
def square(i: int):
return i**2


def main():
numbers = list(range(10))
squared = []

# Run a remote container for every item in list
for result in square.map(numbers):
squared.append(result)
```

## How it works

Beta9 is designed for launching remote serverless containers very quickly. There are a few things that make this possible:

- A custom, lazy loading image format (CLIP) backed by S3/FUSE
- A fast, redis-based container scheduling engine
- Content-addressed storage for caching images and files
- A custom runc container runtime

![demo gif](sdk/docs/demo.gif)

## Contributing

We welcome contributions, big or small! These are the most helpful things for us:
Expand All @@ -119,27 +173,13 @@ We welcome contributions, big or small! These are the most helpful things for us
- Open a PR
- Submit a [feature request](https://github.com/beam-cloud/beta9/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=) or [bug report](https://github.com/beam-cloud/beta9/issues/new?assignees=&labels=&projects=&template=bug-report.md&title=)

## Philosophy

Our mission is to simplify the complexity of the cloud. To do this, we've built a Python-first abstraction for launching serverless containers on GPUs.

In our view, the existing cloud providers provide tools that are too bloated and complicated for developers to iterate quickly.

Beam is the alternative to setting up a Kubernetes cluster or spinning up a cloud VM.

Beam gives you all the tools you need to run code on cloud GPUs, expose that code behind an API, and iterate quickly on your app.

## Open-source vs. paid

This repo is available under the Apache license. If you'd like to use the cloud hosted version, you can visit our [pricing page](https://beam.cloud/pricing).

## Community & Support

If you need support, you can reach out through any of these channels:

- [Slack](https://join.slack.com/t/beam-cloud/shared_invite/zt-2f16bwiiq-oP8weCLWNrf_9lJZIDf0Fg) \(Chat live with our engineering team\)
- [Slack](https://join.slack.com/t/beam-cloud/shared_invite/zt-2f16bwiiq-oP8weCLWNrf_9lJZIDf0Fg) \(Chat live with maintainers and community members\)
- [GitHub issues](https://github.com/beam-cloud/issues) \(Bug reports, feature requests, and anything roadmap related)
- [Twitter](https://twitter.com/beam_cloud) \(Updates on releases)
- [Twitter](https://twitter.com/beam_cloud) \(Updates on releases and stuff)

## Thanks to our contributors

Expand Down

0 comments on commit 4366c6e

Please sign in to comment.