    def pyproject_toml(self, file_path: str) -> t.Self:
        """Add a pyproject.toml to the image. Supports chaining call.

        Example:

        .. code-block:: python

            image = Image("debian:latest").pyproject_toml("pyproject.toml")
        """
        with Path(file_path).open("rb") as f:
            pyproject_toml = tomllib.load(f)
        dependencies = pyproject_toml.get("project", {}).get("dependencies", {})
        self.python_packages(*dependencies)
        return self
Add a pyproject.toml to the image. Supports chaining call.

Example:

.. code-block:: python

image = Image("debian:latest").pyproject_toml("pyproject.toml")
src/_bentoml_sdk/images.py