k3d

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REQUIRED_MEMORY         = 6227000000
	REQUIRED_MEMORY_PRETTY  = "6Gb"
	REQUIRED_STORAGE_KB     = 16777216
	REQUIRED_STORAGE_PRETTY = "15Gb"
)
View Source
const (
	REGISTRY_NAME   = "k3d-tensorleap-registry"
	CONTAINER_NAME  = "k3d-tensorleap-server-0"
	REGISTRY_DOMAIN = "k3d-tensorleap-registry:5000"
)
View Source
const CLUSTER_NAME = "tensorleap"

Variables

View Source
var (
	K3sVersion          = version.K3sVersion
	K3sImage            = fmt.Sprintf("%s:%s", k3d.DefaultK3sImageRepo, K3sVersion)
	K3sGpuVersion       = "v1.26.4-k3s1"
	K3sGpuVersionSuffix = "cuda"
	K3sGpuImage         = fmt.Sprintf("us-central1-docker.pkg.dev/tensorleap/main/k3s:%s-%s", K3sGpuVersion, K3sGpuVersionSuffix)
)

Functions

func CacheImage

func CacheImage(ctx context.Context, image string, regPort string) error

func CacheImageInTheBackground

func CacheImageInTheBackground(ctx context.Context, image string) error

func CacheImagesInParallel

func CacheImagesInParallel(ctx context.Context, images []string, regPort string)

func CheckDockerRequirements

func CheckDockerRequirements() error

func CreateCluster

func CreateCluster(ctx context.Context, port uint, volumes []string, useGpu bool) error

func GetLocalRegistryPort

func GetLocalRegistryPort(ctx context.Context) (string, error)

func GetRegistryPort

func GetRegistryPort(ctx context.Context, reg *Registry) (string, error)

func IsGpuCluster

func IsGpuCluster(cluster *Cluster) bool

func SetupLogger

func SetupLogger(logger *logrus.Logger)

func UninstallCluster

func UninstallCluster(ctx context.Context) error

func UninstallRegister

func UninstallRegister() error

Types

type Cluster

type Cluster = k3d.Cluster

func GetCluster

func GetCluster(ctx context.Context) (*Cluster, error)

type Registry

type Registry = k3d.Registry

func CreateLocalRegistry

func CreateLocalRegistry(ctx context.Context, port uint, volumes []string) (*Registry, error)

type RegistryTagListResponse

type RegistryTagListResponse struct {
	Name string
	Tags []string
}

Jump to

Keyboard shortcuts

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