Documentation
¶
Index ¶
- Constants
- func BaseImageConfigurationExists(cudaVersion, pythonVersion, torchVersion string) bool
- func BaseImageName(cudaVersion string, pythonVersion string, torchVersion string) string
- type BaseImageConfiguration
- type BaseImageGenerator
- type Generator
- func (g *Generator) Cleanup() error
- func (g *Generator) GenerateDockerfileWithoutSeparateWeights() (string, error)
- func (g *Generator) GenerateModelBase() (string, error)
- func (g *Generator) GenerateModelBaseWithSeparateWeights(imageName string) (weightsBase string, dockerfile string, dockerignoreContents string, err error)
- func (g *Generator) GenerateWeightsManifest() (*weights.Manifest, error)
- func (g *Generator) SetUseCogBaseImage(useCogBaseImage bool)
- func (g *Generator) SetUseCudaBaseImage(argumentValue string)
Constants ¶
View Source
const BaseImageRegistry = "r8.im"
View Source
const DockerignoreHeader = `` /* 231-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func BaseImageConfigurationExists ¶ added in v0.9.7
Types ¶
type BaseImageConfiguration ¶ added in v0.9.7
type BaseImageConfiguration struct {
CudaVersion string `json:"cuda_version" yaml:"cuda_version"`
PythonVersion string `json:"python_version" yaml:"python_version"`
TorchVersion string `json:"torch_version" yaml:"torch_version"`
}
func BaseImageConfigurations ¶ added in v0.9.7
func BaseImageConfigurations() []BaseImageConfiguration
func (BaseImageConfiguration) MarshalJSON ¶ added in v0.9.7
func (b BaseImageConfiguration) MarshalJSON() ([]byte, error)
type BaseImageGenerator ¶ added in v0.9.7
type BaseImageGenerator struct {
// contains filtered or unexported fields
}
func NewBaseImageGenerator ¶ added in v0.9.7
func NewBaseImageGenerator(cudaVersion string, pythonVersion string, torchVersion string) (*BaseImageGenerator, error)
func (*BaseImageGenerator) GenerateDockerfile ¶ added in v0.9.7
func (g *BaseImageGenerator) GenerateDockerfile() (string, error)
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 (*Generator) GenerateDockerfileWithoutSeparateWeights ¶ added in v0.8.0
GenerateDockerfileWithoutSeparateWeights generates a Dockerfile that doesn't write model weights to a separate layer.
func (*Generator) GenerateModelBase ¶ added in v0.9.7
func (*Generator) GenerateModelBaseWithSeparateWeights ¶ added in v0.9.7
func (g *Generator) GenerateModelBaseWithSeparateWeights(imageName string) (weightsBase string, dockerfile string, dockerignoreContents string, err error)
GenerateModelBaseWithSeparateWeights 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) GenerateWeightsManifest ¶ added in v0.8.3
func (*Generator) SetUseCogBaseImage ¶ added in v0.9.7
func (*Generator) SetUseCudaBaseImage ¶ added in v0.8.2
Click to show internal directories.
Click to hide internal directories.