Documentation
¶
Index ¶
- Constants
- Variables
- func Base(os, language, image string) error
- func CRANMirror(url string) error
- func CUDA(version, cudnn string)
- func Compile(ctx context.Context, envName string, pub string) (*llb.Definition, error)
- func CompileEntrypoint(buildContextDir string) ([]string, error)
- func CompileEnviron() []string
- func CondaChannel(channel string, useMamba bool) error
- func CondaPackage(deps []string, channel []string, envFile string) error
- func Copy(src, dest string)
- func Entrypoint(args []string)
- func ExposedPorts() (map[string]struct{}, error)
- func GPU(numGPUs int)
- func GPUEnabled() bool
- func Git(name, email, editor string) error
- func HTTP(url, checksum, filename string) error
- func JuliaPackage(deps []string)
- func JuliaPackageServer(url string) error
- func Jupyter(pwd string, port int64) error
- func Labels() (map[string]string, error)
- func Mount(src, dest string)
- func NumGPUs() int
- func PyPIIndex(url, extraURL string) error
- func PyPIPackage(deps []string, requirementsFile string, wheels []string) error
- func RPackage(deps []string)
- func RStudioServer() error
- func Repo(url, description string)
- func Run(commands []string, mount bool) error
- func RuntimeCommands(commands map[string]string)
- func RuntimeDaemon(commands [][]string)
- func RuntimeEnviron(env map[string]string)
- func RuntimeExpose(envdPort, hostPort int, serviceName string, listeningAddr string) error
- func RuntimeInitScript(commands []string)
- func Shell(shell string) error
- func SystemPackage(deps []string)
- func UbuntuAPT(source string) error
- func VSCodePlugins(plugins []string) error
- type CondaConfig
- type CopyInfo
- type ExposeItem
- type GitConfig
- type Graph
- func (g Graph) CacheID(filename string) string
- func (g Graph) Compile(uid, gid int) (llb.State, error)
- func (g *Graph) CompileCacheDir(root llb.State, cacheDir string) llb.State
- func (g Graph) DefaultCacheImporter() (*string, error)
- func (g Graph) EnvString() []string
- func (g Graph) ExposedPorts() (map[string]struct{}, error)
- func (g Graph) GPUEnabled() bool
- func (g *Graph) GetEntrypoint(buildContextDir string) ([]string, error)
- func (g Graph) Labels() (map[string]string, error)
- type HTTPInfo
- type JupyterConfig
- type Language
- type MountInfo
- type RStudioServerConfig
- type RunBuildCommand
- type RuntimeGraph
Constants ¶
View Source
const (
CUDNNVersionDefault = "8"
)
Variables ¶
View Source
var DefaultGraph = NewGraph()
Functions ¶
func CRANMirror ¶ added in v0.1.0
func CompileEntrypoint ¶ added in v0.2.0
func CompileEnviron ¶ added in v0.2.0
func CompileEnviron() []string
func CondaChannel ¶ added in v0.1.0
func CondaPackage ¶ added in v0.1.0
func Entrypoint ¶ added in v0.2.0
func Entrypoint(args []string)
func ExposedPorts ¶ added in v0.2.0
func GPUEnabled ¶
func GPUEnabled() bool
func JuliaPackage ¶ added in v0.2.0
func JuliaPackage(deps []string)
func JuliaPackageServer ¶ added in v0.2.0
func RStudioServer ¶ added in v0.2.0
func RStudioServer() error
func RuntimeCommands ¶ added in v0.2.0
func RuntimeDaemon ¶ added in v0.2.0
func RuntimeDaemon(commands [][]string)
func RuntimeEnviron ¶ added in v0.2.0
func RuntimeExpose ¶ added in v0.2.0
func RuntimeInitScript ¶ added in v0.2.4
func RuntimeInitScript(commands []string)
func SystemPackage ¶
func SystemPackage(deps []string)
func VSCodePlugins ¶
Types ¶
type CondaConfig ¶ added in v0.1.0
type ExposeItem ¶ added in v0.2.0
type Graph ¶
type Graph struct { OS string Language Image *string Shell string CUDA *string CUDNN string NumGPUs int UbuntuAPTSource *string CRANMirrorURL *string JuliaPackageServer *string PyPIIndexURL *string PyPIExtraIndexURL *string PublicKeyPath string PyPIPackages []string RequirementsFile *string PythonWheels []string RPackages []string JuliaPackages []string SystemPackages []string VSCodePlugins []vscode.Plugin UserDirectories []string Exec []RunBuildCommand Copy []CopyInfo Mount []MountInfo HTTP []HTTPInfo Entrypoint []string Repo types.RepoInfo *JupyterConfig *GitConfig *CondaConfig *RStudioServerConfig Writer compileui.Writer // EnvironmentName is the base name of the environment. // It is the BaseDir(BuildContextDir) // e.g. mnist, streamlit-mnist EnvironmentName string RuntimeGraph // contains filtered or unexported fields }
A Graph contains the state, such as its call stack and thread-local storage. TODO(gaocegeg): Refactor it to support order.
func (*Graph) CompileCacheDir ¶ added in v0.2.0
func (Graph) DefaultCacheImporter ¶ added in v0.2.0
func (Graph) ExposedPorts ¶ added in v0.2.0
func (Graph) GPUEnabled ¶
func (*Graph) GetEntrypoint ¶ added in v0.2.0
type JupyterConfig ¶
type RStudioServerConfig ¶ added in v0.2.0
type RStudioServerConfig struct { }
type RunBuildCommand ¶ added in v0.2.4
type RuntimeGraph ¶ added in v0.2.0
type RuntimeGraph struct { RuntimeCommands map[string]string RuntimeDaemon [][]string RuntimeInitScript [][]string RuntimeEnviron map[string]string RuntimeExpose []ExposeItem }
The results during runtime should be maintained here
func (*RuntimeGraph) Dump ¶ added in v0.2.0
func (rg *RuntimeGraph) Dump() (string, error)
func (*RuntimeGraph) Load ¶ added in v0.2.0
func (rg *RuntimeGraph) Load(code []byte) error
Click to show internal directories.
Click to hide internal directories.