Documentation
¶
Overview ¶
Copyright 2022 The envd Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- 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 Run(commands []string) error
- func RuntimeCommands(commands map[string]string)
- func RuntimeDaemon(commands [][]string)
- func RuntimeEnviron(env map[string]string)
- func RuntimeExpose(envdPort, hostPort int, serviceName string) error
- 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) CondaEnabled() bool
- 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 RuntimeGraph
Constants ¶
This section is empty.
Variables ¶
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 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
Exec []string
Copy []CopyInfo
Mount []MountInfo
HTTP []HTTPInfo
Entrypoint []string
*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) CondaEnabled ¶ added in v0.1.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 RuntimeGraph ¶ added in v0.2.0
type RuntimeGraph struct {
RuntimeCommands map[string]string
RuntimeDaemon [][]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