Source code for superduperdb.cli.serve

import json
import typing as t

from . import command


[docs] @command(help='Start local cluster: server, ray and change data capture') def local_cluster(): from superduperdb.base.build import build_datalayer from superduperdb.server.cluster import cluster db = build_datalayer() cluster(db)
[docs] @command(help='Start standalone change data capture') def cdc(): from superduperdb.cdc.app import app app.start()
[docs] @command(help='Serve a model on ray') def ray_serve( model: str, version: t.Optional[int] = None, ray_actor_options: str = '', num_replicas: int = 1, ): from superduperdb.backends.ray.serve import run run( model=model, version=version, ray_actor_options=json.loads(ray_actor_options), num_replicas=num_replicas, )
[docs] @command(help='Start FastAPI REST server') def rest(): from superduperdb.rest.app import app app.start()