Velar Python SDK - Deploy ML models to GPUs with one command
Project description
Velar Python SDK
Deploy ML models to GPUs with one command.
Installation
pip install velar-sdk
Quick Start
velar login # authenticate via browser
velar run app:app # deploy + run + cleanup
import os
import velar
app = velar.App("my-app")
image = velar.Image.from_registry(
"pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime"
).pip_install("transformers", "accelerate")
@app.function(gpu="A100", image=image, timeout=600)
def run(prompt: str) -> str:
from transformers import pipeline
pipe = pipeline("text-generation", model="gpt2")
return pipe(prompt, max_length=100)[0]["generated_text"]
@app.local_entrypoint()
def main():
app.deploy(wait=True)
print(run.remote("The future of AI is"))
Full documentation: velar.run/docs
Links
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
velar_sdk-0.4.15.tar.gz
(24.3 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
File details
Details for the file velar_sdk-0.4.15.tar.gz.
File metadata
- Download URL: velar_sdk-0.4.15.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ebac1927c63ffcef08cc9fbb0f61056a61cef9ab9ede2b09d507b8f984baed
|
|
| MD5 |
301aa4794b48e8bd76e7f7d118cedf7a
|
|
| BLAKE2b-256 |
c87c2ac7197346320195e4869cdcd3d566afb9abee0b1998573fe14dc584a9d3
|
File details
Details for the file velar_sdk-0.4.15-py3-none-any.whl.
File metadata
- Download URL: velar_sdk-0.4.15-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ad9366dd5e3e7cc1fa2a873f74af5720275c78f752485e373520ab210ebbe96
|
|
| MD5 |
2f01ce520dab14f5e27ef0e19937631d
|
|
| BLAKE2b-256 |
1f44e905f5c5719836d0563e24ef9dbe5f5fda0348b308dce16d9e82db307ef7
|