gpucreate

package
v0.6.318 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package gpucreate provides a command to create GPU instances with retry logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdGPUCreate

func NewCmdGPUCreate(t *terminal.Terminal, gpuCreateStore GPUCreateStore) *cobra.Command

NewCmdGPUCreate creates the gpu-create command

func RunGPUCreate

func RunGPUCreate(t *terminal.Terminal, gpuCreateStore GPUCreateStore, opts GPUCreateOptions) error

RunGPUCreate executes the GPU create with retry logic

Types

type CreateResult

type CreateResult struct {
	Workspace    *entity.Workspace
	InstanceType string
	Error        error
}

CreateResult holds the result of a workspace creation attempt

type GPUCreateOptions

type GPUCreateOptions struct {
	Name           string
	InstanceTypes  []InstanceSpec
	Count          int
	Parallel       int
	Detached       bool
	Timeout        time.Duration
	StartupScript  string
	Mode           string
	Jupyter        bool
	JupyterSet     bool // whether --jupyter was explicitly set
	ContainerImage string
	ComposeFile    string
}

GPUCreateOptions holds the options for GPU instance creation

type GPUCreateStore

type GPUCreateStore interface {
	util.GetWorkspaceByNameOrIDErrStore
	gpusearch.GPUSearchStore
	GetActiveOrganizationOrDefault() (*entity.Organization, error)
	GetCurrentUser() (*entity.User, error)
	GetWorkspace(workspaceID string) (*entity.Workspace, error)
	CreateWorkspace(organizationID string, options *store.CreateWorkspacesOptions) (*entity.Workspace, error)
	DeleteWorkspace(workspaceID string) (*entity.Workspace, error)
	GetAllInstanceTypesWithWorkspaceGroups(orgID string) (*gpusearch.AllInstanceTypesResponse, error)
}

GPUCreateStore defines the interface for GPU create operations

type InstanceSpec

type InstanceSpec struct {
	Type   string
	DiskGB float64 // Target disk size in GB, 0 means use default
}

InstanceSpec holds an instance type and its target disk size

Jump to

Keyboard shortcuts

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