Skip to content

Commit

Permalink
fix: set max RAM memory
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia committed Feb 24, 2024
1 parent 820c5ec commit 39a1384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etc/modules/nomad.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ job "userjob-${JOB_UUID}" {
args = ["--${SERVICE}"]
ports = ["api", "monitor", "ide"]
shm_size = ${SHARED_MEMORY}
memory_hard_limit = ${RAM}
volumes = [
"/nomad-storage/${JOB_UUID}:/storage:shared",
]
Expand All @@ -156,6 +157,7 @@ job "userjob-${JOB_UUID}" {
resources {
cores = ${CPU_NUM}
memory = ${RAM}
memory_max = ${RAM}

device "gpu" {
count = ${GPU_NUM}
Expand Down
2 changes: 2 additions & 0 deletions etc/tools/deep-oc-federated-server/nomad.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ job "userjob-${JOB_UUID}" {
image = "${DOCKER_IMAGE}:${DOCKER_TAG}"
ports = ["fedserver", "monitor", "ide"]
shm_size = ${SHARED_MEMORY}
memory_hard_limit = ${RAM}
}

env {
Expand All @@ -120,6 +121,7 @@ job "userjob-${JOB_UUID}" {
resources {
cores = ${CPU_NUM}
memory = ${RAM}
memory_max = ${RAM}
}
}
}
Expand Down

0 comments on commit 39a1384

Please sign in to comment.