Skip to content

Commit

Permalink
Changed GCP machine type
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Jan 15, 2024
1 parent 9d1dfaf commit 80f3bd4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions dev-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ services:
volumes:
- ./scr:/calcus/scr
- ./keys:/calcus/keys
- ./calc:/calcus/calc
env_file:
- ./.env
links:
Expand Down
6 changes: 3 additions & 3 deletions frontend/cloud_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def create_container_job(calc, nproc, timeout):
"CALCUS_CLOUD": "True",
"NUM_CPU": str(nproc),
"OMP_NUM_THREADS": f"{nproc},1",
"OMP_STACKSIZE": "900M",
"OMP_STACKSIZE": "3500M",
"CALCUS_TIMEOUT": str(timeout),
# Variables for rescheduling when a VM in preempted
"CALC_ID": str(calc.id),
Expand All @@ -139,7 +139,7 @@ def create_container_job(calc, nproc, timeout):

resources = batch_v1.ComputeResource()
resources.cpu_milli = nproc * 1000 # in milliseconds per cpu-second
resources.memory_mib = nproc * 1024
resources.memory_mib = 4 * nproc * 1024
task.compute_resource = resources

task.max_retry_count = 1
Expand All @@ -153,7 +153,7 @@ def create_container_job(calc, nproc, timeout):
group.parallelism = 1

policy = batch_v1.AllocationPolicy.InstancePolicy()
policy.machine_type = f"n2d-highcpu-{nproc}"
policy.machine_type = f"t2d-standard-{nproc}"
# policy.boot_disk = ...
# https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#Disk

Expand Down
2 changes: 1 addition & 1 deletion frontend/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4977,7 +4977,7 @@ def get_calc(calc_id):

calc.save()

if calc.step.creates_ensemble:
if calc.step.creates_ensemble and "Conformational" not in calc.step.name:
analyse_opt(calc.id)
calc.refresh_from_db()

Expand Down
6 changes: 3 additions & 3 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mkdir -p data

docker-compose down
docker-compose pull
docker compose down
docker compose pull
docker image prune -f
docker-compose up --remove-orphans
docker compose up --remove-orphans
6 changes: 3 additions & 3 deletions start_dev.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

mkdir -p data
docker-compose down --remove-orphans
docker compose down --remove-orphans
git pull
docker-compose -f dev-compose.yml build
docker-compose -f dev-compose.yml -f docker-compose.override.yml up
docker compose -f dev-compose.yml build
docker compose -f dev-compose.yml -f docker-compose.override.yml up
6 changes: 3 additions & 3 deletions start_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

mkdir -p data

docker-compose down --remove-orphans
docker-compose -f test-compose.yml -f test-compose.override.yml build
docker-compose -f test-compose.yml -f test-compose.override.yml up
docker compose down --remove-orphans
docker compose -f test-compose.yml -f test-compose.override.yml build
docker compose -f test-compose.yml -f test-compose.override.yml up

0 comments on commit 80f3bd4

Please sign in to comment.