@@ -2,9 +2,6 @@ package deployment
22
33import (
44 "fmt"
5- log "github.com/sirupsen/logrus"
6- "github.com/vhive-serverless/loader/pkg/common"
7- "github.com/vhive-serverless/loader/pkg/config"
85 "io"
96 "math/rand"
107 "net"
@@ -14,6 +11,10 @@ import (
1411 "strings"
1512 "sync"
1613 "time"
14+
15+ log "github.com/sirupsen/logrus"
16+ "github.com/vhive-serverless/loader/pkg/common"
17+ "github.com/vhive-serverless/loader/pkg/config"
1718)
1819
1920type dirigentDeployer struct {}
@@ -47,6 +48,7 @@ func (*dirigentDeployer) Deploy(cfg *config.Configuration) {
4748 dirigentConfig .RegistrationServer ,
4849 cfg .LoaderConfiguration .BusyLoopOnSandboxStartup ,
4950 cfg .LoaderConfiguration .PrepullMode ,
51+ cfg .LoaderConfiguration .RpsRequestedGpu ,
5052 )
5153 }(i )
5254 }
@@ -80,7 +82,7 @@ var checkClient = &http.Client{
8082 },
8183}
8284
83- func deployDirigent (function * common.Function , controlPlaneAddress string , busyLoopOnColdStart bool , prepullMode string ) {
85+ func deployDirigent (function * common.Function , controlPlaneAddress string , busyLoopOnColdStart bool , prepullMode string , requestedGpu int ) {
8486 metadata := function .DirigentMetadata
8587
8688 if metadata == nil {
@@ -95,6 +97,7 @@ func deployDirigent(function *common.Function, controlPlaneAddress string, busyL
9597 "scaling_lower_bound" : {strconv .Itoa (metadata .ScalingLowerBound )},
9698 "requested_cpu" : {strconv .Itoa (function .CPURequestsMilli )},
9799 "requested_memory" : {strconv .Itoa (function .MemoryRequestsMiB )},
100+ "requested_gpu" : {strconv .Itoa (requestedGpu )},
98101 "env_vars" : metadata .EnvVars , // FORMAT: arg1=value1 arg2=value2 ...
99102 "program_args" : metadata .ProgramArgs , // FORMAT: arg1 arg2 ...
100103 "prepull_mode" : {prepullMode },
0 commit comments