    def freeze(self, platform_: str | None = None) -> ImageInfo:
        """Freeze the image to an ImageInfo object for build."""
        python_requirements = self._freeze_python_requirements(platform_)
        return ImageInfo(
            base_image=self.base_image,
            python_version=self.python_version,
            commands=["export UV_COMPILE_BYTECODE=1", *self.commands],
            python_requirements=python_requirements,
            post_commands=self.post_commands,
            scripts=self.scripts,
        )
Freeze the image to an ImageInfo object for build.
src/_bentoml_sdk/images.py