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

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


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.14.tar.gz (24.2 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.4.14-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velar_sdk-0.4.14.tar.gz
  • Upload date:
  • Size: 24.2 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.4.14.tar.gz
Algorithm Hash digest
SHA256 1ec0c8209d5ace4c40a4b2588c88890e22ad993ac8119526a88f945cc89403cf
MD5 67084af8691ed9de5ec842876d7681e4
BLAKE2b-256 6d0f2125f88bb350292427880f6034bb8e0020bf147bff351e6fbb2852f7d4a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velar_sdk-0.4.14-py3-none-any.whl
  • Upload date:
  • Size: 27.5 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.4.14-py3-none-any.whl
Algorithm Hash digest
SHA256 db204c7fa65b34925048587bdb0fb261dda75c0d051194824292ea3a41e71ead
MD5 40064f3634582f96d0badf40a6ad7692
BLAKE2b-256 8a8f8360837699a2f19aea1c1ef54a3aec9909c0b742ab090eacf81751abc5a7

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