image

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(cfg *config.Config, dir, imageName string, progressOutput string) 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 BuildBase

func BuildBase(cfg *config.Config, dir string, progressOutput string) (string, error)

func GetConfig added in v0.0.14

func GetConfig(imageName string) (*config.Config, error)

Types

type Input

type Input struct {
	Name    string    `json:"name"`
	Type    InputType `json:"type,omitempty"`
	Default *string   `json:"default,omitempty"`
	Min     *string   `json:"min,omitempty"`
	Max     *string   `json:"max,omitempty"`
	Options *[]string `json:"options,omitempty"`
	Help    *string   `json:"help,omitempty"`
}

type InputType

type InputType string
const (
	InputTypeString InputType = "str"
	InputTypeInt    InputType = "int"
	InputTypeFloat  InputType = "float"
	InputTypeBool   InputType = "bool"
	InputTypePath   InputType = "Path"
)

type TypeSignature

type TypeSignature struct {
	Inputs []Input `json:"inputs,omitempty"`
}

func GetTypeSignature

func GetTypeSignature(imageName string, enableGPU bool) (*TypeSignature, error)

Jump to

Keyboard shortcuts

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