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 ¶
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
Click to show internal directories.
Click to hide internal directories.