dockerfile

package
v0.10.0-alpha25 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DockerignoreHeader = `` /* 231-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator added in v0.0.16

type Generator struct {
	Config *config.Config
	Dir    string

	// these are here to make this type testable
	GOOS   string
	GOARCH string
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(config *config.Config, dir string) (*Generator, error)

func (*Generator) Cleanup added in v0.0.16

func (g *Generator) Cleanup() error

func (*Generator) Generate added in v0.0.16

func (g *Generator) Generate(imageName string) (weightsBase string, dockerfile string, dockerignoreContents string, err error)

Generate creates the Dockerfile and .dockerignore file contents for model weights It returns four values: - weightsBase: The base image used for Dockerfile generation for model weights. - dockerfile: A string that represents the Dockerfile content generated by the function. - dockerignoreContents: A string that represents the .dockerignore content. - err: An error object if an error occurred during Dockerfile generation; otherwise nil.

func (*Generator) GenerateBase added in v0.0.16

func (g *Generator) GenerateBase() (string, error)

func (*Generator) GenerateDockerfileWithoutSeparateWeights added in v0.8.0

func (g *Generator) GenerateDockerfileWithoutSeparateWeights() (string, error)

GenerateDockerfileWithoutSeparateWeights generates a Dockerfile that doesn't write model weights to a separate layer.

func (*Generator) GenerateWeightsManifest added in v0.8.3

func (g *Generator) GenerateWeightsManifest() (*weights.Manifest, error)

func (*Generator) SetUseCudaBaseImage added in v0.8.2

func (g *Generator) SetUseCudaBaseImage(argumentValue string)

Jump to

Keyboard shortcuts

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