ir

package
v0.1.0-alpha.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGraph = NewGraph()

Functions

func Base

func Base(os, language string)

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)

func GPUEnabled

func GPUEnabled() bool

func Git added in v0.1.0

func Git(name, email, editor string) error

func Jupyter

func Jupyter(pwd string, port int64) error

func Labels

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

func PyPIIndex

func PyPIIndex(mode, url, extraURL string) error

func PyPIPackage

func PyPIPackage(deps []string)

func RPackage added in v0.1.0

func RPackage(deps []string)

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 GitConfig added in v0.1.0

type GitConfig struct {
	Name   string
	Email  string
	Editor string
}

type Graph

type Graph struct {
	OS       string
	Language string
	Shell    string
	CUDA     *string
	CUDNN    *string

	UbuntuAPTSource   *string
	PyPIIndexURL      *string
	PyPIExtraIndexURL *string
	CondaChannel      *string

	PublicKeyPath string

	PyPIPackages   []string
	RPackages      []string
	CondaPackages  []string
	SystemPackages []string

	VSCodePlugins []vscode.Plugin

	Exec []string
	*JupyterConfig
	*GitConfig

	Writer      compileui.Writer
	CachePrefix string
}

A Graph contains the state, such as its call stack and thread-local storage.

func NewGraph

func NewGraph() *Graph

func (Graph) CacheID

func (g Graph) CacheID(filename string) string

func (Graph) Compile

func (g Graph) Compile() (llb.State, error)

func (Graph) GPUEnabled

func (g Graph) GPUEnabled() bool

func (Graph) Labels

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

type JupyterConfig

type JupyterConfig struct {
	Password string
	Port     int64
}

Jump to

Keyboard shortcuts

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