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

Merge branch 'patch/swappiness' into 'master'

Adding soft memory limit for docker jobs while turning off swapping

See merge request EKPCondor/HTConfig!12
parents aa27f73c 85dc422d
Branches
No related tags found
No related merge requests found
......@@ -82,9 +82,13 @@ def main():
if arg in ['exe', 'image', 'command']:
continue
for val in vals or []:
docker_opts += ['--' + arg, val]
if arg=='memory':
docker_opts += ['--memory-swap', val]
docker_opts += ['--memory', int(val)*2]
docker_opts += ['--memory-swap', int(val)*2]
docker_opts += ['--memory-reservation', val]
docker_opts += ['--memory-swappiness', 0]
else:
docker_opts += ['--' + arg, val]
# Enable GPUS if CUDA_VISIBLE_DEVICES is set to a GPU but --gpus flag is not present
if [x for x in docker_opts if (('CUDA_VISIBLE_DEVICES=' in x) and not ('CUDA_VISIBLE_DEVICES=10000' in x))] and ('--gpus' not in docker_opts):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment