From 5ee7d074a3441aab258f2a975b65f618443b49ec Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 7 Nov 2024 15:53:08 +0100 Subject: Resource constraints --- compile-and-run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compile-and-run.sh b/compile-and-run.sh index f60def4..64bacb1 100755 --- a/compile-and-run.sh +++ b/compile-and-run.sh @@ -33,6 +33,8 @@ catch compiler_stdout compiler_stderr docker run \ --rm \ --network none \ -e APPLICATION_NAME=$application_name \ + --memory=128m \ + --cpus=1 \ -v "$src_path:/opt/src:ro" \ -v "$exec_path:/tmp/exec" \ $compiler_image @@ -54,6 +56,8 @@ if [ $compiler_status -eq 0 ]; then catch runner_stdout runner_stderr timeout 60 docker run \ --rm \ -h "java-runner-$runner_id" \ + --memory=32m \ + --cpus=0.25 \ --network none \ -e "APPLICATION_NAME=$application_name" \ $runner_image -- cgit v1.2.3