Skip to content

Commit

Permalink
Different approach
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Jan 15, 2024
1 parent 8228adb commit cc4934e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/cloud_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def create_container_job(calc, nproc, timeout):
str(calc.id),
]

if nproc > 1:
runnable.container.options = "--shm-size 8G"

env = batch_v1.Environment()
env.secret_variables = {"POSTGRES_PASSWORD": settings.POSTGRES_SECRET_URI}
env.variables = {
Expand Down Expand Up @@ -167,9 +170,6 @@ def create_container_job(calc, nproc, timeout):
("shutdown-script-url", "gs://calcus-cloud-config/shutdown_script.py")
)

if nproc > 1:
metadata.append(("startup-script-url", "gs://calcus-cloud-config/set_shm.sh"))

instances = batch_v1.AllocationPolicy.InstancePolicyOrTemplate()
instances.policy = policy

Expand Down

0 comments on commit cc4934e

Please sign in to comment.