Documentation
¶
Index ¶
- func Build(ctx context.Context, cfg *config.Config, dir, imageName string, ...) error
- func BuildAddLabelsAndSchemaToImage(ctx context.Context, dockerClient command.Command, image string, ...) error
- func BuildBase(ctx context.Context, dockerClient command.Command, cfg *config.Config, ...) (string, error)
- func CogConfigFromManifest(ctx context.Context, manifest *image.InspectResponse) (*config.Config, error)
- func GenerateModelDependencies(ctx context.Context, dockerClient command.Command, imageName string, ...) (string, error)
- func GenerateOpenAPISchema(ctx context.Context, dockerClient command.Command, imageName string, ...) (map[string]any, error)
- func GeneratePipFreeze(ctx context.Context, dockerClient command.Command, imageName string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build( ctx context.Context, cfg *config.Config, dir, imageName string, secrets []string, noCache, separateWeights bool, useCudaBaseImage string, progressOutput string, schemaFile string, dockerfileFile string, useCogBaseImage *bool, strip bool, precompile bool, fastFlag bool, annotations map[string]string, localImage bool, dockerCommand command.Command, client registry.Client, pipelinesImage bool) error
Build a Cog model from a config
This is separated out from docker.Build(), so that can be as close as possible to the behavior of 'docker build'.
func BuildAddLabelsAndSchemaToImage ¶ added in v0.14.9
func BuildAddLabelsAndSchemaToImage(ctx context.Context, dockerClient command.Command, image string, labels map[string]string, bundledSchemaFile string, progressOutput string) error
BuildAddLabelsAndSchemaToImage builds a cog model with labels and schema.
The new image is based on the provided image with the labels and schema file appended to it.
func CogConfigFromManifest ¶ added in v0.14.8
func GenerateModelDependencies ¶ added in v0.15.1
func GenerateOpenAPISchema ¶ added in v0.1.0
func GenerateOpenAPISchema(ctx context.Context, dockerClient command.Command, imageName string, enableGPU bool) (map[string]any, error)
GenerateOpenAPISchema by running the image and executing Cog This will be run as part of the build process then added as a label to the image. It can be retrieved more efficiently with the label by using GetOpenAPISchema
func GeneratePipFreeze ¶ added in v0.13.3
func GeneratePipFreeze(ctx context.Context, dockerClient command.Command, imageName string, fastFlag bool) (string, error)
GeneratePipFreeze by running a pip freeze on the image. This will be run as part of the build process then added as a label to the image.
Types ¶
This section is empty.