Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type CreateEndpointInput struct {
ScalerValue int `json:"scalerValue"`
WorkersMin int `json:"workersMin"`
WorkersMax int `json:"workersMax"`
FlashBootType string `json:"flashBootType"`
}

// there are many more fields in the result of the query but I just care about these for CLI port
Expand Down
7 changes: 4 additions & 3 deletions cmd/project/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func deployProject(networkVolumeId string) (endpointId string, err error) {
minWorkers := 0
maxWorkers := 3
flashboot := true
flashbootSuffix := " -fb"
flashBootType := "FLASHBOOT"
idleTimeout := 5
endpointConfig, ok := config.Get("endpoint").(*toml.Tree)
if ok {
Expand All @@ -592,15 +592,15 @@ func deployProject(networkVolumeId string) (endpointId string, err error) {
flashboot = fb
}
if !flashboot {
flashbootSuffix = ""
flashBootType = "OFF"
}
if idle, ok := endpointConfig.Get("idle_timeout").(int64); ok {
idleTimeout = int(idle)
}
}
if err != nil {
deployedEndpointId, err = api.CreateEndpoint(&api.CreateEndpointInput{
Name: fmt.Sprintf("%s-endpoint-%s%s", projectName, projectId, flashbootSuffix),
Name: fmt.Sprintf("%s-endpoint-%s", projectName, projectId),
TemplateId: projectEndpointTemplateId,
NetworkVolumeId: networkVolumeId,
GpuIds: "AMPERE_16",
Expand All @@ -609,6 +609,7 @@ func deployProject(networkVolumeId string) (endpointId string, err error) {
ScalerValue: 4,
WorkersMin: minWorkers,
WorkersMax: maxWorkers,
FlashBootType: flashBootType,
})
if err != nil {
fmt.Println("error making endpoint")
Expand Down
Loading