ir

package
v0.2.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var DefaultGraph = NewGraph()

Functions

func Base

func Base(os, language, image string) error

func CRANMirror added in v0.1.0

func CRANMirror(url string) error

func CUDA

func CUDA(version, cudnn string)

func Compile

func Compile(ctx context.Context, cachePrefix string, pub string) (*llb.Definition, error)

func CompileEntrypoint added in v0.2.0

func CompileEntrypoint(buildContextDir string) ([]string, error)

func CondaChannel added in v0.1.0

func CondaChannel(channel string) error

func CondaPackage added in v0.1.0

func CondaPackage(deps []string, channel []string, envFile *string) error

func Copy added in v0.2.0

func Copy(src, dest string)

func Entrypoint added in v0.2.0

func Entrypoint(args []string)

func ExposedPorts added in v0.2.0

func ExposedPorts() (map[string]struct{}, error)

func GPU added in v0.1.0

func GPU(numGPUs int)

func GPUEnabled

func GPUEnabled() bool

func Git added in v0.1.0

func Git(name, email, editor string) error

func JuliaPackage added in v0.2.0

func JuliaPackage(deps []string)

func JuliaPackageServer added in v0.2.0

func JuliaPackageServer(url string) error

func Jupyter

func Jupyter(pwd string, port int64) error

func Labels

func Labels() (map[string]string, error)

func Mount added in v0.2.0

func Mount(src, dest string)

func NumGPUs added in v0.1.0

func NumGPUs() int

func PyPIIndex

func PyPIIndex(mode, url, extraURL string) error

func PyPIPackage

func PyPIPackage(deps []string, requirementsFile *string) error

func RPackage added in v0.1.0

func RPackage(deps []string)

func RStudioServer added in v0.2.0

func RStudioServer() error

func Run

func Run(commands []string) error

func RuntimeCommands added in v0.2.0

func RuntimeCommands(commands map[string]string)

func Shell

func Shell(shell string) error

func SystemPackage

func SystemPackage(deps []string)

func UbuntuAPT

func UbuntuAPT(mode, source string) error

UbuntuAPT updates the Ubuntu apt source.list in the image.

func VSCodePlugins

func VSCodePlugins(plugins []string) error

Types

type CondaConfig added in v0.1.0

type CondaConfig struct {
	CondaPackages      []string
	AdditionalChannels []string
	CondaChannel       *string
}

type CopyInfo added in v0.2.0

type CopyInfo struct {
	Source      string
	Destination string
}

type GitConfig added in v0.1.0

type GitConfig struct {
	Name   string
	Email  string
	Editor string
}

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
	RPackages      []string
	JuliaPackages  []string
	SystemPackages []string

	VSCodePlugins []vscode.Plugin

	Exec            []string
	Copy            []CopyInfo
	Mount           []MountInfo
	Entrypoint      []string
	RuntimeCommands map[string]string

	*JupyterConfig
	*GitConfig
	*CondaConfig
	*RStudioServerConfig

	Writer      compileui.Writer
	CachePrefix string
	// 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 NewGraph

func NewGraph() *Graph

func (Graph) CacheID

func (g Graph) CacheID(filename string) string

func (Graph) Compile

func (g Graph) Compile(uid, gid int) (llb.State, error)

func (Graph) CompileCacheDir added in v0.2.0

func (g Graph) CompileCacheDir(root llb.State, cacheDir string) llb.State

func (Graph) CondaEnabled added in v0.1.0

func (g Graph) CondaEnabled() bool

func (Graph) DefaultCacheImporter added in v0.2.0

func (g Graph) DefaultCacheImporter() (*string, error)

func (Graph) ExposedPorts added in v0.2.0

func (g Graph) ExposedPorts() (map[string]struct{}, error)

func (Graph) GPUEnabled

func (g Graph) GPUEnabled() bool

func (Graph) GetEntrypoint added in v0.2.0

func (g Graph) GetEntrypoint(buildContextDir string) ([]string, error)

func (Graph) Labels

func (g Graph) Labels() (map[string]string, error)

type JupyterConfig

type JupyterConfig struct {
	Token string
	Port  int64
}

type Language added in v0.1.0

type Language struct {
	Name    string
	Version *string
}

type MountInfo added in v0.2.0

type MountInfo struct {
	Source      string
	Destination string
}

type RStudioServerConfig added in v0.2.0

type RStudioServerConfig struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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