ir

package
v0.2.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 21 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 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(buildContextDir string) ([]string, error)

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 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 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

	*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) Entrypoint added in v0.2.0

func (g Graph) Entrypoint(buildContextDir string) ([]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) GetAppropriatePythonVersion

func (g Graph) GetAppropriatePythonVersion() (string, error)

func (Graph) Labels

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

type JupyterConfig

type JupyterConfig struct {
	Password string
	Port     int64
}

type Language added in v0.1.0

type Language struct {
	Name    string
	Version *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