types

package
v0.2.4-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

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"

	ImageLabelVendor    = "ai.tensorchord.envd.vendor"
	ImageLabelGPU       = "ai.tensorchord.envd.gpu"
	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"
	RuntimeGraphCode    = "ai.tensorchord.envd.runtimeGraph"

	ImageVendorEnvd = "envd"
)
View Source
const DefaultPathEnvUnix = "/opt/conda/envs/envd/bin:/opt/conda/bin:/home/envd/.local/bin:/usr/local/julia/bin:" + system.DefaultPathEnvUnix

DefaultPathEnvUnix is unix style list of directories to search for executables. Each directory is separated from the next by a colon ':' character .

View Source
const DefaultPathEnvWindows = system.DefaultPathEnvWindows

DefaultPathEnvWindows is windows style list of directories to search for executables. Each directory is separated from the next by a colon ';' character .

View Source
const PythonBaseImage = "ubuntu:20.04"

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",
	"tini",
	"sudo",
	"vim",
	"zsh",
}
View Source
var BaseEnvironment = []struct {
	Name  string
	Value string
}{
	{"DEBIAN_FRONTEND", "noninteractive"},
	{"PATH", DefaultPathEnvUnix},
	{"LANG", "C.UTF-8"},
	{"LC_ALL", "C.UTF-8"},
}
View Source
var EnvdSshdImage = fmt.Sprintf(
	"tensorchord/envd-sshd-from-scratch:%s",
	version.GetVersionForImageTag())

Functions

func GetImageName

func GetImageName(image EnvdImage) string

Types

type AuthConfig added in v0.2.4

type AuthConfig struct {
	Name          string `json:"name,omitempty"`
	IdentityToken string `json:"identity_token,omitempty"`
}

type BuilderType added in v0.2.0

type BuilderType string
const (
	BuilderTypeDocker     BuilderType = "docker-container"
	BuilderTypeKubernetes BuilderType = "kube-pod"
	BuilderTypeTCP        BuilderType = "tcp"
)

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"`
}

func (Context) GetSSHHostname added in v0.2.4

func (c Context) GetSSHHostname() (string, error)

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 NewDependencyFromImage

func NewDependencyFromImage(img types.ImageSummary) (*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 EnvdContext struct {
	Current  string    `json:"current,omitempty"`
	Contexts []Context `json:"contexts,omitempty"`
}

type EnvdEnvironment

type EnvdEnvironment struct {
	types.Container

	Name              string  `json:"name,omitempty"`
	JupyterAddr       *string `json:"jupyter_addr,omitempty"`
	RStudioServerAddr *string `json:"rstudio_server_addr,omitempty"`
	EnvdManifest      `json:",inline,omitempty"`
}

func NewEnvironment

func NewEnvironment(ctr types.Container) (*EnvdEnvironment, error)

type EnvdImage

type EnvdImage struct {
	types.ImageSummary

	EnvdManifest `json:",inline,omitempty"`
}

func NewImage

func NewImage(image types.ImageSummary) (*EnvdImage, error)

type EnvdInfo added in v0.2.0

type EnvdInfo struct {
	types.Info
}

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

type PortBinding struct {
	Port     string
	Protocol string
	HostIP   string
	HostPort string
}

func NewPortBindingFromContainerJSON added in v0.2.0

func NewPortBindingFromContainerJSON(ctr types.ContainerJSON) []PortBinding

type RunnerType added in v0.2.4

type RunnerType string
const (
	RunnerTypeDocker     RunnerType = "docker"
	RunnerTypeEnvdServer RunnerType = "envd-server"
)

Jump to

Keyboard shortcuts

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