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.13.tar.gz
(24.0 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.13.tar.gz.
File metadata
- Download URL: velar_sdk-0.4.13.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c30c46f5aea48f1dfde3567d20f75f6b22156856834168829d1625edc128c40
|
|
| MD5 |
d26fcf2b3383fb732ec2a4fdc4c953d9
|
|
| BLAKE2b-256 |
d2ed0d3fae129a752ac2434bf72bf1b8ebfb57b9289149a268c4f31489658fae
|
File details
Details for the file velar_sdk-0.4.13-py3-none-any.whl.
File metadata
- Download URL: velar_sdk-0.4.13-py3-none-any.whl
- Upload date:
- Size: 27.2 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 |
bbf21ea2dfd3b93e3100c152a666132b96e120f105ccb6d235de1ff21be05e0e
|
|
| MD5 |
668dcaf13c4798cc769d1853816993a6
|
|
| BLAKE2b-256 |
7f9dc2e7001134b0c57b75150bd274437c9030f7158f401cc94693f04674c018
|