A globally distributed container runtime
Project description
nebulous-py
A declarative python library for the Nebulous runtime
Installation
pip install nebu
Usage
Create a pytorch container on runpod with 1 A100 GPU
from nebu import Container, V1EnvVar
container = Container(
name="pytorch-example",
namespace="test",
image="pytorch/pytorch:latest",
platform="runpod",
env=[V1EnvVar(name="MY_ENV_VAR", value="my-value")],
command="nvidia-smi",
accelerators=["1:A100_SXM"],
proxy_port=8080,
)
while container.status.status.lower() != "running":
print(f"Container '{container.metadata.name}' is not running, it is '{container.status.status}', waiting...")
time.sleep(1)
print(f"Container '{container.metadata.name}' is running")
print(f"You can access the container at {container.status.tailnet_url}")
Decorator
Run a python function in a container [in progress]
from nebu import container
@container(image="python:3.10-slim", accelerators=["1:A100_SXM"])
def my_function(x: int, y: int) -> int:
return x + y
result = my_function(1, 2)
print(result)
Contributing
Please open an issue or a PR to contribute to the project.
Development
make test
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
nebu-0.1.128.tar.gz
(79.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nebu-0.1.128-py3-none-any.whl
(84.7 kB
view details)
File details
Details for the file nebu-0.1.128.tar.gz.
File metadata
- Download URL: nebu-0.1.128.tar.gz
- Upload date:
- Size: 79.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66812626d1a75842d313a2cd3b8b3c8f59b20ba11452ce2e62afcdbbd111d2df
|
|
| MD5 |
4ef9f8274d4c4356865195c7a8ff2512
|
|
| BLAKE2b-256 |
5151b0ba632928d06c9c4523c67dcc64ffd986247d3a9240d380c1e81c5f3be5
|
File details
Details for the file nebu-0.1.128-py3-none-any.whl.
File metadata
- Download URL: nebu-0.1.128-py3-none-any.whl
- Upload date:
- Size: 84.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d6173842e09434e0c8d13c9f89ee0e89545ed4cc3dba653794d5dc6434eda1c
|
|
| MD5 |
6da8502dfbd366a5eaf32f2a9fda68e9
|
|
| BLAKE2b-256 |
7e5ae334e7ebead462310bb4051766d0ef0adb0979f8ad8bcd56a84eff1cb3b0
|