kitfile

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKitfileForRef

func GetKitfileForRef(ctx context.Context, configHome string, ref *registry.Reference) (*artifact.KitFile, error)

func GetKitfileForRefString

func GetKitfileForRefString(ctx context.Context, configHome string, ref string) (*artifact.KitFile, error)

func ResolveKitfile

func ResolveKitfile(ctx context.Context, configHome, kitfileRef, baseRef string) (*artifact.KitFile, error)

ResolveKitfile returns the Kitfile for a reference. Any references to other modelkits are fetched and included in the resolved Kitfile, giving the equivalent Kitfile including the model, datasets, and code from those referenced modelkits.

func SaveModel

func SaveModel(ctx context.Context, localRepo local.LocalRepo, kitfile *artifact.KitFile, ignore filesystem.IgnorePaths, compression string) (*ocispec.Descriptor, error)

SaveModel saves an *artifact.Model to the provided oras.Target, compressing layers. It attempts to block modelkits that include paths that leave the base context directory, allowing only subdirectories of the root context to be included in the modelkit.

func ValidateKitfile

func ValidateKitfile(kf *artifact.KitFile) error

ValidateKitfile returns an error if the parsed Kitfile is not valid. The error string is multiple lines, each consisting of an issue in the kitfile (e.g. duplicate path).

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL