it will only if oom killer is enabled
true, but you will still get OOM (I believe). I think the main issue is the even from inside the container, when you query the memory, you see the entire machine's memory... I'm not sure what we can do about that
Also have a look at --memory-swap
It seems you might not anticipated this usage:
If --memory-swap is unset, and --memory is set, the container can use as much swap as the --memory setting, if the host container has swap memory configured. For instance, if --memory="300m" and --memory-swap is not set, the container can use 600m in total of memory and swap.
docker will Not actually limit the “vioew of the memory” it will just kill the container if you pass the memory limit, this is a limitation of docker runtime
it will only if oom killer is enabled
Wait... Will it limit memory usage but not show it in overview or just plain stop the container if it happens to use more memory?
AgitatedDove14 we can read sys/fs/cgroup/memory/memory.limit_in_bytes to get the limit
https://faun.pub/understanding-docker-container-memory-limit-behavior-41add155236c
Wait, I noticed you need another set of quotes:
Sample in the docs is: --memory="300m"
https://docs.docker.com/config/containers/resource_constraints/
EnviousPanda91 notice that when passing these arguments to clearml-agent you are actually passing default args, if you want an additional argument to Always be used, set the extra_docker_arguments
here:
https://github.com/allegroai/clearml-agent/blob/9eee213683252cd0bd19aae3f9b2c65939d75ac3/docs/clearml.conf#L170
Basically internally we use psutil to get those stats ...
https://github.com/giampaolo/psutil/issues/1011
See psutil version that fixed that, what do you see on the Task "installed packages" ?
https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#591
One additional thing to notice, docker will Not actually limit the "vioew of the memory" it will just kill the container if you pass the memory limit, this is a limitation of docker runtime