def build(
    bento_tag: Tag | str,
    backend: DefaultBuilder = "docker",
    image_tag: tuple[str] | None = None,
    features: t.Sequence[str] | None = None,
    _bento_store: BentoStore = Provide[BentoMLContainer.bento_store],
    **kwargs: t.Any,
) -> t.Any:
    """
    Build any given BentoML into a OCI-compliant image.

    .. code-block:: python

        import bentoml

        bento = bentoml.get("pytorch_vgg:latest")
        bentoml.container.build(bento, backend='podman', features=["grpc", "tracing"])

    Args:
        bento_tag: Bento tag in format of ``NAME:VERSION``
        backend: The backend to use for building the image. Current supported builder backends
                 include ``docker``, ``podman``, ``buildah``, ``nerdctl``, ``buildctl``, and ``buildx``.

                 .. note::

                     ``buildx`` is a syntatic sugar for ``docker buildx build``. See https://docs.docker.com/build/.
                     The reason for this is that ``buildx`` used to be the default behaviour of ``bentoml containerize``.
        image_tag: Optional additional image tag to apply to the built image.
        features: Optional features to include in the container file. See :ref:`concepts/bento:Python packages`
                  for additional BentoML features.
        **kwargs: Additional keyword arguments to pass to the builder backend. Refer to the above overload
                  for each of the supported arguments per backend.
    """
    from ._internal.container import determine_container_tag

    # Run healthcheck
    if not health(backend):
        raise BentoMLException("Backend %s is not healthy." % backend)

    if "tag" not in kwargs:
        kwargs["tag"] = determine_container_tag(bento_tag, image_tag=image_tag)
    bento = _bento_store.get(bento_tag)

    logger.info("Building OCI-compliant image for %s with %s\n", bento.tag, backend)
    return _internal_build(bento_tag, backend, features=features, **kwargs)
Build any given BentoML into a OCI-compliant image.

.. code-block:: python

import bentoml

bento = bentoml.get("pytorch_vgg:latest")
bentoml.container.build(bento, backend='podman', features=["grpc", "tracing"])

Args:
bento_tag: Bento tag in format of ``NAME:VERSION``
backend: The backend to use for building the image. Current supported builder backends
include ``docker``, ``podman``, ``buildah``, ``nerdctl``, ``buildctl``, and ``buildx``.

.. note::

``buildx`` is a syntatic sugar for ``docker buildx build``. See https://docs.docker.com/build/.
The reason for this is that ``buildx`` used to be the default behaviour of ``bentoml containerize``.
image_tag: Optional additional image tag to apply to the built image.
features: Optional features to include in the container file. See :ref:`concepts/bento:Python packages`
for additional BentoML features.
**kwargs: Additional keyword arguments to pass to the builder backend. Refer to the above overload
for each of the supported arguments per backend.
src/bentoml/container.py