Skip to content
Snippets Groups Projects
Commit ac70da99 authored by Maximilian Horzela's avatar Maximilian Horzela
Browse files

[docker_wrapper] Set hard limit to requested memory

parent 8ad56499
Branches
No related tags found
No related merge requests found
......@@ -85,8 +85,8 @@ def main():
if arg=='memory':
# split memory argument in numbers (amount of memory) and characters (unit), first element is an empty string
_, request_memory, unit = re.split('(\d+)', val)
docker_opts += ['--memory', "{}{}".format(int(request_memory)*2, unit)]
docker_opts += ['--memory-swap', "{}{}".format(int(request_memory)*2, unit)]
docker_opts += ['--memory', "{}{}".format(int(request_memory), unit)]
docker_opts += ['--memory-swap', "{}{}".format(int(request_memory), unit)]
docker_opts += ['--memory-reservation',"{}{}".format(int(request_memory), unit)]
docker_opts += ['--memory-swappiness', "0"]
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment