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.17.tar.gz (26.8 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.17-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velar_sdk-0.4.17.tar.gz
  • Upload date:
  • Size: 26.8 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.17.tar.gz
Algorithm Hash digest
SHA256 d597eff16d70082128af3dda3fc4d7e2fad1d184b24d1f7584ce6ab4ba352546
MD5 e47ae9237a946bc8ec1d3886c6323489
BLAKE2b-256 fec70ff6e0b35156b0eaa6c070a907f22e281346f071399f6cf9a50c4fcb5e1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velar_sdk-0.4.17-py3-none-any.whl
  • Upload date:
  • Size: 30.4 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.17-py3-none-any.whl
Algorithm Hash digest
SHA256 80b937390c85a8290e4103337bf4acae716d51b7745e2dc42991460e868c0892
MD5 b0b5c3a63f41ec5e224fc67b31471095
BLAKE2b-256 c7db074dd5078dac6e3e99d00f6d836742327d131ce1812f4f1bde6c75b9e9bc

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