def make_bake_dict(self) -> typing.Dict[(str, dict)]:
    root: typing.Dict[(str, dict)] = {}
    root['target'] = {}
    versions_to_bake = set()
    for (image, version) in self.group_info.iter_images_versions():
        use_conan = ((self.group_info.type == constants.ImageType.PACKAGE) and (self.use_conan or self.index.is_conan_only_package(image.replace('ci-package-', ''))))
        major_version = utils.get_major_version(version)
        version_info = self.index.version_info(major_version)
        if (self.group_info.type == constants.ImageType.PACKAGE):
            image_base = image.replace('ci-package-', '')
            group = self.index.get_group_from_image(self.group_info.type, image_base)
            if use_conan:
                if (version in versions_to_bake):
                    continue
                if (version_info.ci_common_version != major_version):
                    version = version_info.ci_common_version
                    major_version = utils.get_major_version(version)
                versions_to_bake.add(version)
                tags = list(map((lambda tag: (f'{constants.DOCKER_REGISTRY}/{self.build_info.docker_org}' + f'/ci-centos7-gl-conan:{tag}')), [version, major_version]))
                docker_file = 'packages/common/Dockerfile'
            else:
                tags = version_info.get_tags(version, self.build_info.docker_org, image, extra_suffix=version_info.package_versions.get((('ASWF_' + image.replace('ci-package-', '').upper()) + '_VERSION')))
                docker_file = f'packages/{group}/Dockerfile'
        else:
            tags = version_info.get_tags(version, self.build_info.docker_org, image)
            docker_file = f'{image}/Dockerfile'
        if (version_info.ci_common_version == major_version):
            channel = f'ci_common{major_version}'
        else:
            channel = f'vfx{version_info.major_version}'
        args = {'ASWF_ORG': self.build_info.docker_org, 'ASWF_PKG_ORG': self.build_info.package_org, 'ASWF_VERSION': version, 'CI_COMMON_VERSION': version_info.ci_common_version, 'ASWF_CONAN_CHANNEL': channel}
        args.update(version_info.all_package_versions)
        target_dict = {'context': '.', 'dockerfile': docker_file, 'args': args, 'labels': {'org.opencontainers.image.created': self.build_info.build_date, 'org.opencontainers.image.revision': self.build_info.vcs_ref}, 'tags': tags, 'output': [('type=registry,push=true' if self.push else 'type=docker')]}
        if (self.group_info.type == constants.ImageType.PACKAGE):
            if use_conan:
                target_dict['target'] = 'ci-centos7-gl-conan'
            else:
                target_dict['target'] = image
        root['target'][f'{image}-{major_version}'] = target_dict
    root['group'] = {'default': {'targets': list(root['target'].keys())}}
    return root
def make_bake_dict(self) -> typing.Dict[(str, dict)]:
    root: typing.Dict[(str, dict)] = {}
    root['target'] = {}
    versions_to_bake = set()
    for (image, version) in self.group_info.iter_images_versions():
        use_conan = ((self.group_info.type == constants.ImageType.PACKAGE) and (self.use_conan or self.index.is_conan_only_package(image.replace('ci-package-', ))))
        major_version = utils.get_major_version(version)
        version_info = self.index.version_info(major_version)
        if (self.group_info.type == constants.ImageType.PACKAGE):
            image_base = image.replace('ci-package-', )
            group = self.index.get_group_from_image(self.group_info.type, image_base)
            if use_conan:
                if (version in versions_to_bake):
                    continue
                if (version_info.ci_common_version != major_version):
                    version = version_info.ci_common_version
                    major_version = utils.get_major_version(version)
                versions_to_bake.add(version)
                tags = list(map((lambda tag: (f'{constants.DOCKER_REGISTRY}/{self.build_info.docker_org}' + f'/ci-centos7-gl-conan:{tag}')), [version, major_version]))
                docker_file = 'packages/common/Dockerfile'
            else:
                tags = version_info.get_tags(version, self.build_info.docker_org, image, extra_suffix=version_info.package_versions.get((('ASWF_' + image.replace('ci-package-', ).upper()) + '_VERSION')))
                docker_file = f'packages/{group}/Dockerfile'
        else:
            tags = version_info.get_tags(version, self.build_info.docker_org, image)
            docker_file = f'{image}/Dockerfile'
        if (version_info.ci_common_version == major_version):
            channel = f'ci_common{major_version}'
        else:
            channel = f'vfx{version_info.major_version}'
        args = {'ASWF_ORG': self.build_info.docker_org, 'ASWF_PKG_ORG': self.build_info.package_org, 'ASWF_VERSION': version, 'CI_COMMON_VERSION': version_info.ci_common_version, 'ASWF_CONAN_CHANNEL': channel}
        args.update(version_info.all_package_versions)
        target_dict = {'context': '.', 'dockerfile': docker_file, 'args': args, 'labels': {'org.opencontainers.image.created': self.build_info.build_date, 'org.opencontainers.image.revision': self.build_info.vcs_ref}, 'tags': tags, 'output': [('type=registry,push=true' if self.push else 'type=docker')]}
        if (self.group_info.type == constants.ImageType.PACKAGE):
            if use_conan:
                target_dict['target'] = 'ci-centos7-gl-conan'
            else:
                target_dict['target'] = image
        root['target'][f'{image}-{major_version}'] = target_dict
    root['group'] = {'default': {'targets': list(root['target'].keys())}}
    return root