ir

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 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 GPUEnabled

func GPUEnabled() bool

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

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

	UbuntuAPTSource   *string
	PyPIIndexURL      *string
	PyPIExtraIndexURL *string

	PublicKeyPath string

	BuiltinSystemPackages []string
	PyPIPackages          []string
	SystemPackages        []string
	VSCodePlugins         []vscode.Plugin

	Exec []string
	*JupyterConfig

	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