BentoCloud API

本页提供创建和管理 BentoCloud 部署的 API 参考。

另请参阅

有关用法详情,请参阅管理部署

创建

在 BentoCloud 上创建一个部署。

bentoml.deployment.create(name: str | None = None, path_context: str | None = None, *, bento: Tag | str | None = None, cluster: str | None = None, access_authorization: bool | None = None, scaling_min: int | None = None, scaling_max: int | None = None, instance_type: str | None = None, strategy: str | None = None, envs: t.List[EnvItemSchema] | t.List[dict[str, t.Any]] | None = None, extras: dict[str, t.Any] | None = None) Deployment[source]
bentoml.deployment.create(name: str | None = None, path_context: str | None = None, *, bento: Tag | str | None = None, config_file: str | None = None) Deployment
bentoml.deployment.create(name: str | None = None, path_context: str | None = None, *, bento: Tag | str | None = None, config_dict: dict[str, t.Any] | None = None) Deployment

有关更多信息,请参阅创建部署

获取

检索特定部署的详细信息。

bentoml.deployment.get(name: str, cluster: str | None = None, _cloud_client: BentoCloudClient = <simple_di.providers.SingletonFactory object>) Deployment[source]

有关更多信息,请参阅查看

列出

列出 BentoCloud 上的所有部署。

bentoml.deployment.list(cluster: str | None = None, search: str | None = None, dev: bool = False, q: str | None = None, labels: t.List[LabelItemSchema] | t.List[dict[str, t.Any]] | None = None, _cloud_client: BentoCloudClient = <simple_di.providers.SingletonFactory object>) t.List[Deployment][source]

更新

更新特定部署的配置。

bentoml.deployment.update(name: str | None = None, path_context: str | None = None, context: str | None = ..., cluster: str | None = None, *, bento: Tag | str | None = None, access_authorization: bool | None = None, scaling_min: int | None = None, scaling_max: int | None = None, instance_type: str | None = None, strategy: str | None = None, envs: t.List[EnvItemSchema] | t.List[dict[str, t.Any]] | None = None, secrets: t.List[str] | None = None, extras: dict[str, t.Any] | None = None) Deployment[source]
bentoml.deployment.update(name: str | None = None, path_context: str | None = None, context: str | None = ..., cluster: str | None = None, *, bento: Tag | str | None = None, config_file: str | None = None) Deployment
bentoml.deployment.update(name: str | None = None, path_context: str | None = None, context: str | None = ..., cluster: str | None = None, *, bento: Tag | str | None = None, config_dict: dict[str, t.Any] | None = None) Deployment

有关更多信息,请参阅更新

应用

根据提供的规范创建或更新部署。

bentoml.deployment.apply(name: str | None = None, cluster: t.Optional[str] = None, path_context: t.Optional[str] = None, *, bento: t.Optional[t.Union[Tag, str]] = None, config_dict: t.Optional[dict[str, t.Any]] = None) Deployment[source]
bentoml.deployment.apply(name: str | None = None, cluster: t.Optional[str] = None, path_context: t.Optional[str] = None, *, bento: t.Optional[t.Union[Tag, str]] = None, config_file: t.Optional[str] = None) Deployment

有关更多信息,请参阅应用

终止

停止部署,稍后可以重新启动。

bentoml.deployment.terminate(name: str, cluster: str | None = None, wait: bool = False, _cloud_client: BentoCloudClient = <simple_di.providers.SingletonFactory object>) Deployment[source]

有关更多信息,请参阅终止

删除

从 BentoCloud 中删除部署。

bentoml.deployment.delete(name: str, cluster: str | None = None, _cloud_client: BentoCloudClient = <simple_di.providers.SingletonFactory object>) None[source]

有关更多信息,请参阅删除