Skip to content

context

BuildContext

BuildContext(base_dir=None, platforms=None)

This class provides configuration options for the build context of a Chassis model container.

Parameters:

Name Type Description Default
base_dir Optional[str]

Optional directory path to save build context of model container

None
platforms Optional[List[str]]

List of target platforms to build and compile container versions. If multiple provided, the RemoteBuilder will build a separate version for each architecture and push them to the designated registry under the same container repository and tag.

None

base_dir instance-attribute

base_dir = base_dir if base_dir is not None else tempfile.mkdtemp()

chassis_dir instance-attribute

chassis_dir = os.path.join(self.base_dir, 'chassis')

data_dir instance-attribute

data_dir = os.path.join(self.base_dir, PACKAGE_DATA_PATH)

platforms instance-attribute

platforms: List[str] = platforms

cleanup

cleanup()

Removes the folder used to stage files for the context.