ggufpackerui

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT, Apache-2.0 Imports: 38 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultLocalNameContext     = "context"
	DefaultGGUFPackerfileName   = "GGUFPackerfile"
	DefaultGGUFPackerignoreName = ".ggufpackerignore"
	EmptyImageName              = "scratch"
)
View Source
const (
	DefaultImage = "docker.io/gpustack/gguf-packer:latest"
)

Variables

This section is empty.

Functions

func DefaultMainContext

func DefaultMainContext(opts ...llb.LocalOption) *llb.State

func DetectGitContext

func DetectGitContext(ref string, keepGit bool) (*llb.State, bool)

func DetectHTTPContext

func DetectHTTPContext(ref string) (*llb.State, string, bool)

func WithInternalName

func WithInternalName(name string) llb.ConstraintsOpt

Types

type BuildFunc

type BuildFunc func(ctx context.Context, platform *specs.Platform, idx int) (r client.Reference, img, baseImg *specs.Image, err error)

type Client

type Client struct {
	Config
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c client.Client) (*Client, error)

func (*Client) Build

func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, error)

func (*Client) BuildOpts

func (bc *Client) BuildOpts() client.BuildOpts

func (*Client) GGUFPackerIgnorePatterns

func (bc *Client) GGUFPackerIgnorePatterns(ctx context.Context) ([]string, error)

func (*Client) HandleSubrequest

func (bc *Client) HandleSubrequest(ctx context.Context, h RequestHandler) (*client.Result, bool, error)

func (*Client) IsNoCache

func (bc *Client) IsNoCache(name string) bool

func (*Client) MainContext

func (bc *Client) MainContext(ctx context.Context, opts ...llb.LocalOption) (*llb.State, error)

func (*Client) NamedContext

func (bc *Client) NamedContext(ctx context.Context, name string, opt ContextOpt) (*llb.State, *specs.Image, error)

func (*Client) ReadEntrypoint

func (bc *Client) ReadEntrypoint(ctx context.Context, lang string, opts ...llb.LocalOption) (*Source, error)

type Config

type Config struct {
	BuildArgs        map[string]string
	CacheIDNamespace string
	CgroupParent     string
	Epoch            *time.Time
	ExtraHosts       []llb.HostIP
	ImageResolveMode llb.ResolveMode
	Labels           map[string]string
	NetworkMode      pb.NetMode
	ShmSize          int64
	Target           string
	Ulimits          []pb.Ulimit
	LinterConfig     *linter.Config

	CacheImports           []client.CacheOptionsEntry
	TargetPlatforms        []specs.Platform // nil means default
	BuildPlatforms         []specs.Platform
	MultiPlatformRequested bool

	ConvertImage  string
	QuantizeImage string
	ParseImage    string
}

type ContextOpt

type ContextOpt struct {
	AsyncLocalOpts func() []llb.LocalOption
	Platform       *specs.Platform
	ResolveMode    string
	CaptureDigest  *digest.Digest
}

type RequestHandler

type RequestHandler struct {
	Outline     func(context.Context) (*outline.Outline, error)
	ListTargets func(context.Context) (*targets.List, error)
	Lint        func(context.Context) (*lint.LintResults, error)
	AllowOther  bool
}

type ResultBuilder

type ResultBuilder struct {
	*client.Result
	// contains filtered or unexported fields
}

func (*ResultBuilder) EachPlatform

func (rb *ResultBuilder) EachPlatform(ctx context.Context, fn func(ctx context.Context, id string, p specs.Platform) error) error

func (*ResultBuilder) Finalize

func (rb *ResultBuilder) Finalize() (*client.Result, error)

type Source

type Source struct {
	*llb.SourceMap
	Warn func(context.Context, string, client.WarnOpts)
}

Jump to

Keyboard shortcuts

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