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.39.tar.gz
(52.1 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.39-py3-none-any.whl
(56.0 kB
view details)
File details
Details for the file nebu-0.1.39.tar.gz.
File metadata
- Download URL: nebu-0.1.39.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f10ec4ba92994802ece5a8db44ff08274b79b170b32cc41b127fe8304bd6204
|
|
| MD5 |
0a8addbc5af8467955e7520b85ee7709
|
|
| BLAKE2b-256 |
9dcfdea89dadf551a5405088ec729ca353eebabd70e1405ac827678c83e1b396
|
File details
Details for the file nebu-0.1.39-py3-none-any.whl.
File metadata
- Download URL: nebu-0.1.39-py3-none-any.whl
- Upload date:
- Size: 56.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45206e6bd998b3d29803251ca52079cf2c1784d4730a2248743246e74274ad2
|
|
| MD5 |
745b3efc7f1c9b3ef0fc4828545ffa40
|
|
| BLAKE2b-256 |
155cb6658246609a60bf4ebd4fe1070aa9765fafd7910550dbfc7634cc8d2a5b
|