Documentation ¶
Index ¶
Constants ¶
View Source
const ( // environment PATH DefaultSystemPath = system.DefaultPathEnvUnix DefaultCondaPath = "/opt/conda/envs/envd/bin:/opt/conda/bin:/home/envd/.local/bin" DefaultJuliaPath = "/usr/local/julia/bin" // image PythonBaseImage = "ubuntu:20.04" EnvdStarshipImage = "tensorchord/starship:v0.0.1" // supervisor HorustImage = "tensorchord/horust:v0.2.3" HorustServiceDir = "/etc/horust/services" HorustLogDir = "/var/log/horust" // env EnvdWorkDir = "ENVD_WORKDIR" )
View Source
const ( ContainerLabelName = "ai.tensorchord.envd.name" ContainerLabelJupyterAddr = "ai.tensorchord.envd.jupyter.address" ContainerLabelRStudioServerAddr = "ai.tensorchord.envd.rstudio.server.address" ContainerLabelSSHPort = "ai.tensorchord.envd.ssh.port" ImageLabelContainerName = "ai.tensorchord.envd.container.name" ImageLabelVendor = "ai.tensorchord.envd.vendor" ImageLabelGPU = "ai.tensorchord.envd.gpu" ImageLabelRepo = "ai.tensorchord.envd.repo" ImageLabelPorts = "ai.tensorchord.envd.ports" ImageLabelAPT = "ai.tensorchord.envd.apt.packages" ImageLabelPyPI = "ai.tensorchord.envd.pypi.commands" ImageLabelR = "ai.tensorchord.envd.r.packages" ImageLabelCUDA = "ai.tensorchord.envd.gpu.cuda" ImageLabelCUDNN = "ai.tensorchord.envd.gpu.cudnn" ImageLabelContext = "ai.tensorchord.envd.build.context" ImageLabelCacheHash = "ai.tensorchord.envd.build.digest" ImageLabelSyntaxVer = "ai.tensorchord.envd.syntax.version" RuntimeGraphCode = "ai.tensorchord.envd.graph.runtime" GeneralGraphCode = "ai.tensorchord.envd.graph.general" ImageVendorEnvd = "envd" )
Variables ¶
View Source
var BaseAptPackage = []string{
"bash-static",
"libtinfo5",
"libncursesw5",
"bzip2",
"ca-certificates",
"libglib2.0-0",
"libsm6",
"libxext6",
"libxrender1",
"mercurial",
"procps",
"subversion",
"wget",
"curl",
"openssh-client",
"git",
"sudo",
"vim",
"make",
"zsh",
"locales",
}
View Source
var BaseEnvironment = []struct { Name string Value string }{ {"DEBIAN_FRONTEND", "noninteractive"}, {"PATH", DefaultSystemPath}, {"LANG", "en_US.UTF-8"}, {"LC_ALL", "en_US.UTF-8"}, }
View Source
var EnvdSshdImage = fmt.Sprintf( "tensorchord/envd-sshd-from-scratch:%s", version.GetVersionForImageTag())
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶ added in v0.2.4
type BuilderType ¶ added in v0.2.0
type BuilderType string
const ( BuilderTypeMoby BuilderType = "moby-worker" BuilderTypeDocker BuilderType = "docker-container" BuilderTypeNerdctl BuilderType = "nerdctl-container" BuilderTypeKubernetes BuilderType = "kube-pod" BuilderTypeTCP BuilderType = "tcp" BuilderTypeUNIXDomainSocket BuilderType = "unix" )
type Context ¶ added in v0.2.0
type Context struct { Name string `json:"name,omitempty"` Builder BuilderType `json:"builder,omitempty"` BuilderAddress string `json:"builder_address,omitempty"` Runner RunnerType `json:"runner,omitempty"` RunnerAddress *string `json:"runner_address,omitempty"` }
type Dependency ¶
type Dependency struct { APTPackages []string `json:"apt_packages,omitempty"` PyPIPackages []string `json:"pypi_packages,omitempty"` }
func NewDependencyFromContainerJSON ¶
func NewDependencyFromContainerJSON(ctr types.ContainerJSON) (*Dependency, error)
func NewDependencyFromImageSummary ¶ added in v0.2.5
func NewDependencyFromImageSummary(img types.ImageSummary) (*Dependency, error)
func NewDependencyFromLabels ¶ added in v0.2.4
func NewDependencyFromLabels(label map[string]string) (*Dependency, error)
type EnvdAuth ¶ added in v0.2.4
type EnvdAuth struct { Current string `json:"current,omitempty"` Auth []AuthConfig `json:"auth,omitempty"` }
type EnvdContext ¶ added in v0.2.0
type EnvdEnvironment ¶
type EnvdEnvironment struct { servertypes.Environment `json:",inline,omitempty"` EnvdManifest `json:",inline,omitempty"` }
func NewEnvironmentFromContainer ¶ added in v0.2.4
func NewEnvironmentFromContainer(ctr types.Container) (*EnvdEnvironment, error)
func NewEnvironmentFromServer ¶ added in v0.2.4
func NewEnvironmentFromServer(ctr servertypes.Environment) (*EnvdEnvironment, error)
type EnvdImage ¶
type EnvdImage struct { servertypes.ImageMeta `json:",inline,omitempty"` EnvdManifest `json:",inline,omitempty"` }
func NewImageFromMeta ¶ added in v0.2.5
func NewImageFromMeta(meta servertypes.ImageMeta) (*EnvdImage, error)
func NewImageFromSummary ¶ added in v0.2.5
func NewImageFromSummary(image types.ImageSummary) (*EnvdImage, error)
type EnvdManifest ¶
type EnvdManifest struct { GPU bool `json:"gpu,omitempty"` CUDA string `json:"cuda,omitempty"` CUDNN string `json:"cudnn,omitempty"` BuildContext string `json:"build_context,omitempty"` Dependency `json:",inline,omitempty"` }
type PortBinding ¶ added in v0.2.0
func NewPortBindingFromContainerJSON ¶ added in v0.2.0
func NewPortBindingFromContainerJSON(ctr types.ContainerJSON) ([]PortBinding, error)
type RunnerType ¶ added in v0.2.4
type RunnerType string
const ( RunnerTypeDocker RunnerType = "docker" RunnerTypeEnvdServer RunnerType = "envd-server" )
Click to show internal directories.
Click to hide internal directories.