command

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const R8CogVersionEnvVarName = "R8_COG_VERSION"
View Source
const R8CudaVersionEnvVarName = "R8_CUDA_VERSION"
View Source
const R8CudnnVersionEnvVarName = "R8_CUDNN_VERSION"
View Source
const R8PythonVersionEnvVarName = "R8_PYTHON_VERSION"
View Source
const R8TorchVersionEnvVarName = "R8_TORCH_VERSION"

Variables

View Source
var CogConfigLabelKey = global.LabelNamespace + "config"
View Source
var CogModelDependenciesLabelKey = global.LabelNamespace + "r8_model_dependencies"
View Source
var CogOpenAPISchemaLabelKey = global.LabelNamespace + "openapi_schema"
View Source
var CogVersionLabelKey = global.LabelNamespace + "version"
View Source
var CogWeightsManifestLabelKey = global.LabelNamespace + "r8_weights_manifest"
View Source
var ErrAuthorizationFailed = errors.New("authorization failed")

Functions

func IsNotFoundError added in v0.14.8

func IsNotFoundError(err error) bool

Types

type Command

type Command interface {
	// Pull pulls an image from a remote registry and returns the inspect response for the local image.
	// If the image already exists, it will return the inspect response for the local image without pulling.
	// When force is true, it will always attempt to pull the image.
	Pull(ctx context.Context, ref string, force bool) (*image.InspectResponse, error)
	Push(ctx context.Context, ref string) error
	LoadUserInformation(ctx context.Context, registryHost string) (*UserInfo, error)
	Inspect(ctx context.Context, ref string) (*image.InspectResponse, error)
	ImageExists(ctx context.Context, ref string) (bool, error)
	ContainerLogs(ctx context.Context, containerID string, w io.Writer) error
	ContainerInspect(ctx context.Context, id string) (*container.InspectResponse, error)
	ContainerStop(ctx context.Context, containerID string) error

	ImageBuild(ctx context.Context, options ImageBuildOptions) error
	Run(ctx context.Context, options RunOptions) error
	ContainerStart(ctx context.Context, options RunOptions) (string, error)
}

type Config

type Config struct {
	Labels map[string]string `json:"Labels"`
	Env    []string          `json:"Env"`
}

type ImageBuildOptions added in v0.14.9

type ImageBuildOptions struct {
	WorkingDir         string
	DockerfileContents string
	// TODO[md]: ImageName should be renamed to Tag
	ImageName string
	// Secrets in the format of "id=foo,src=/path/to/file" or "id=kube,env=KUBECONFIG"
	// docs: https://docs.docker.com/build/building/secrets/#use-secrets-in-dockerfile
	Secrets        []string
	NoCache        bool
	ProgressOutput string
	Epoch          *int64
	ContextDir     string
	BuildContexts  map[string]string
	Labels         map[string]string

	// only supported on buildkit client, not cli client
	BuildArgs map[string]*string
}

type Manifest

type Manifest struct {
	Config Config `json:"Config"`
}

type NotFoundError added in v0.14.8

type NotFoundError struct {
	// Ref is a unique identifier, such as an image reference, container ID, etc.
	Ref string
	// Object is the ref type, such as "container", "image", "volume", etc.
	Object string
}

NotFoundError represents “object <ref> wasn’t found” inside the Docker engine.

func (*NotFoundError) Error added in v0.14.8

func (e *NotFoundError) Error() string

func (*NotFoundError) Is added in v0.14.8

func (e *NotFoundError) Is(target error) bool

type Port added in v0.14.11

type Port struct {
	HostPort      int
	ContainerPort int
}

type RunOptions added in v0.14.11

type RunOptions struct {
	Detach  bool
	Args    []string
	Env     []string
	GPUs    string
	Image   string
	Ports   []Port
	Volumes []Volume
	Workdir string
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
}

type UserInfo

type UserInfo struct {
	Token    string
	Username string
}

type Volume added in v0.14.11

type Volume struct {
	Source      string
	Destination string
}

Jump to

Keyboard shortcuts

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