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.16.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.16-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velar_sdk-0.4.16.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.16.tar.gz
Algorithm Hash digest
SHA256 05a7392a968f9f3ffb05ef245f9d758c89b7ce88e89f2a452e436011458d9dc5
MD5 ce41b2e9ad4fe7d143e3b96e3a3d98d1
BLAKE2b-256 fd40ce9129b04238f06198974897fff1bcd8902decba9c11010f2cc1471417b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velar_sdk-0.4.16-py3-none-any.whl
  • Upload date:
  • Size: 30.3 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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 5276e042ba8d433489f07bb12509e029403e548ab7a95e451f415b8fe20fd417
MD5 f5337fee578ffa73612e906795be96dd
BLAKE2b-256 17cc30a1d3f5d273dc45ad7ab85500888aa36f913caadeab6d24f0aafe1970ef

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