Skip to content

Commit 59a1bd3

Browse files
committed
add warning
1 parent 8ddb82d commit 59a1bd3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cwltool/docker.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,5 +358,14 @@ def create_runtime(self, env, runtimeContext):
358358

359359
if runtimeContext.strict_memory_limit and not user_space_docker_cmd:
360360
runtime.append("--memory=%dm" % self.builder.resources["ram"])
361+
elif not user_space_docker_cmd:
362+
res_req = self.builder.get_requirement("ResourceRequirement")[0]
363+
if res_req and ("ramMin" in res_req or "ramMax" is res_req):
364+
_logger.warning(
365+
"Skipping Docker software container '--memory' limit "
366+
"despite presence of ResourceRequirement with ramMin "
367+
"and/or ramMax setting. Consider running with "
368+
"--strict-memory-limit for increased portability "
369+
"assurance.")
361370

362371
return runtime

0 commit comments

Comments
 (0)