Skip to main content

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
L4 24 GB $0.59
RTX4090 24 GB $0.89
L40S 48 GB $1.29
A100 80 GB $2.09
H100 80 GB $3.59
H100-SXM 80 GB $4.04
H200 141 GB $5.39

Prices are approximate. Use velar.VelarClient().get_gpu_prices() for live pricing.

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


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.3.8.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velar_sdk-0.3.8-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file velar_sdk-0.3.8.tar.gz.

File metadata

  • Download URL: velar_sdk-0.3.8.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for velar_sdk-0.3.8.tar.gz
Algorithm Hash digest
SHA256 74effb5ecfafc7081f2d1a9ce01b64ec2d20f06c1ebb6bd53ac085fd897c3ba9
MD5 937442b79e4585dc7c0fa89f53216af3
BLAKE2b-256 56f13882aeb6cf1a71398da6289dd3fa8d7ebd6ef6c2e1efdd01c62b372e36cd

See more details on using hashes here.

File details

Details for the file velar_sdk-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: velar_sdk-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for velar_sdk-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 697758cca29116c26ba8a4165a123b4acb1cf1bb9966921bec03ff35e9af5a7a
MD5 fb41908ccf3ebb0ceb5e809d5f94cd4e
BLAKE2b-256 ed2d6035d1c55c176cd5d5399999c22acdd24aa2355b72fd6fea90f1ac242681

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page