gpucreate

package
v0.6.327 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	LaunchableID   string
	LaunchableInfo *store.LaunchableResponse // populated when LaunchableID is set
}

GPUCreateOptions holds the options for GPU instance creation

type GPUCreateStore

type GPUCreateStore interface {
	util.GetWorkspaceByNameOrIDErrStore
	gpusearch.GPUSearchStore
	GetActiveOrganizationOrDefault() (*entity.Organization, error)
	GetAuthTokens() (*entity.AuthTokens, 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)
	GetLaunchable(launchableID string) (*store.LaunchableResponse, error)
	GetLaunchableLifeCycleScript(launchableID, scriptID string) (*store.LifeCycleScriptResponse, error)
	RedeemCouponCode(organizationID string, code string) (*store.RedeemCouponCodeResponse, 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