diff options
author | Jonas Kohl | 2024-11-07 15:53:08 +0100 |
---|---|---|
committer | Jonas Kohl | 2024-11-07 15:53:08 +0100 |
commit | 5ee7d074a3441aab258f2a975b65f618443b49ec (patch) | |
tree | 9a2c2ecfc9cc9e6cad9dcb7005cf2f512d1905f4 /compile-and-run.sh | |
parent | a7a1a67c0b132ea2a1349b01ddf41716661ab326 (diff) |
Resource constraints
Diffstat (limited to 'compile-and-run.sh')
-rwxr-xr-x | compile-and-run.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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 |