fre.make.make_helpers module
make_helpers contains helper/utility functions for create_compile_script, create_makefile_script, and create_docker_script.
- fre.make.make_helpers.get_mktemplate_path(mk_template: str, container_flag: bool, model_root: str = None) str
get_mktemplate_path resolves the full path to an mkmf template file (.mk) for either a bare-metal system or a container image filesystem.
mk_template may be a bare filename (e.g. intel.mk) or an absolute path (e.g. /path/to/intel.mk).
- Parameters:
mk_template (str) – is the bare filename (e.g. intel.mk) or absolute path to the mkmf template. Defined as mkTemplate in platforms yaml.
container_flag (bool) – is a flag that is True for container builds and False for bare-metal builds.
model_root (str, optional) – Root directory for model install files inside the container (defined as modelRoot in platforms.yaml). Required when container_flag is True and mk_template is a bare filename; unused otherwise.
- Raises:
ValueError – If the resolved template path does not exist on the host filesystem when container_flag is False.
- Returns:
a resolved full path to the mkmf template file.
- Return type:
str