feat: enable limiting and reserving gpu resources

This commit is contained in:
Jose Diaz-Gonzalez
2020-04-14 16:14:37 -04:00
parent aa94dc7a7b
commit 8a380e52c4
7 changed files with 28 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ func TriggerDockerArgsProcessDeploy(appName string, processType string) error {
validLimits := map[string]bool{
"cpu": true,
"nvidia-gpu": true,
"memory": true,
"memory-swap": true,
}
@@ -54,6 +55,10 @@ func TriggerDockerArgsProcessDeploy(appName string, processType string) error {
parts[1] = "cpus"
}
if parts[1] == "nvidia-gpu" {
parts[1] = "gpus"
}
limits[parts[1]] = value
}
if parts[0] == "reserve" {