kopia lustrzana https://github.com/jupyterhub/repo2docker
Clarify comment around memswap & memory
rodzic
2eb4781c2e
commit
74fc378230
|
@ -530,9 +530,10 @@ class BuildPack:
|
|||
"integer but is '{}'".format(type(memory_limit)))
|
||||
limits = {}
|
||||
if memory_limit:
|
||||
# We'd like to always disable swap but all we can do is set the
|
||||
# total amount. This means we only limit it when the caller set
|
||||
# a memory limit
|
||||
# We want to always disable swap. Docker expects `memswap` to
|
||||
# be total allowable memory, *including* swap - while `memory`
|
||||
# points to non-swap memory. We set both values to the same so
|
||||
# we use no swap.
|
||||
limits = {
|
||||
'memory': memory_limit,
|
||||
'memswap': memory_limit
|
||||
|
|
|
@ -28,9 +28,10 @@ class DockerBuildPack(BuildPack):
|
|||
"integer but is '{}'".format(type(memory_limit)))
|
||||
limits = {}
|
||||
if memory_limit:
|
||||
# We'd like to always disable swap but all we can do is set the
|
||||
# total amount. This means we onnly limit it when the caller set
|
||||
# a memory limit
|
||||
# We want to always disable swap. Docker expects `memswap` to
|
||||
# be total allowable memory, *including* swap - while `memory`
|
||||
# points to non-swap memory. We set both values to the same so
|
||||
# we use no swap.
|
||||
limits = {
|
||||
'memory': memory_limit,
|
||||
'memswap': memory_limit,
|
||||
|
|
Ładowanie…
Reference in New Issue