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
Authentication
velar login
This opens your browser, signs you in, and saves an API key to ~/.velar/token automatically.
Quick Start
import velar
app = velar.App("my-model")
image = velar.Image.from_registry("pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime")
image = image.pip_install("transformers", "accelerate")
@app.function(gpu="A100", image=image)
def run_inference(prompt: str) -> str:
from transformers import pipeline
pipe = pipeline("text-generation", model="gpt2")
return pipe(prompt)[0]["generated_text"]
@app.local_entrypoint()
def main():
result = run_inference.remote("Hello, world!")
print(result)
Deploy:
velar deploy app:app
Run locally (calls the remote GPU):
velar run app:app
GPU Types
| Name | VRAM | Price/hr |
|---|---|---|
A100 |
80 GB | $3.20 |
A10 |
24 GB | $1.40 |
L4 |
24 GB | $0.85 |
Image Builder
image = (
velar.Image.from_registry("python:3.11-slim")
.pip_install("torch", "transformers")
.run_commands("apt-get update && apt-get install -y ffmpeg")
.env(HF_HOME="/tmp/hf")
)
CLI Reference
velar login # Authenticate via browser
velar deploy app:app # Deploy to GPU cloud
velar run app:app # Run local entrypoint
velar status # List deployments
velar balance # Show credit balance
velar cancel <id> # Cancel a deployment
velar token set <key> # Set API key manually
velar whoami # Show current user
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.2.2.tar.gz
(14.9 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
velar_sdk-0.2.2-py3-none-any.whl
(16.6 kB
view details)
File details
Details for the file velar_sdk-0.2.2.tar.gz.
File metadata
- Download URL: velar_sdk-0.2.2.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27689c808c5bbec9cf1bc0bbd614c85deb17844cb12c5c93c3b28a3a6a1fecf9
|
|
| MD5 |
5127b0edbb519186017e0228247d0fe5
|
|
| BLAKE2b-256 |
d353fec22d8101f11198011064399cf87e56fbe5c448ff69ced98c7f57efd842
|
File details
Details for the file velar_sdk-0.2.2-py3-none-any.whl.
File metadata
- Download URL: velar_sdk-0.2.2-py3-none-any.whl
- Upload date:
- Size: 16.6 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 |
58b51fc2508fd79208f4834ef95c2db6e0c75481bd8e4af040f3a7a4124a62ce
|
|
| MD5 |
3e25090897f81b1c4e6c3e2764e2bd03
|
|
| BLAKE2b-256 |
9e82b95d9d6fa5c1980fed361e40e9520b4f9a2393fbf4e42a3b7cf107bee7ff
|