Skip to content

Commit 63b2416

Browse files
authored
Update Ubuntu image for Batch VM pools (#1594)
- and run 1 task / VM
1 parent be01175 commit 63b2416

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/tlo/cli.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import configparser
33
import datetime
44
import json
5-
import math
65
import os
76
import pickle
87
import tempfile
@@ -177,9 +176,8 @@ def batch_submit(ctx, scenario_file, asserts_on, more_memory, keep_pool_alive, i
177176
vm_size = config["BATCH"]["POOL_VM_SIZE_MORE_MEMORY"]
178177
else:
179178
vm_size = config["BATCH"]["POOL_VM_SIZE"]
180-
# TODO: cap the number of nodes in the pool? Take the number of nodes in
181-
# input from the user, but always at least 2?
182-
pool_node_count = max(2, math.ceil(scenario.number_of_draws * scenario.runs_per_draw))
179+
180+
pool_node_count = scenario.number_of_draws * scenario.runs_per_draw
183181

184182
# User identity in the Batch tasks
185183
auto_user = batch_models.AutoUserSpecification(
@@ -748,20 +746,20 @@ def create_job(
748746
print("Creating job.")
749747

750748
# From https://docs.microsoft.com/en-us/azure/batch/batch-docker-container-workloads#linux-support
751-
# We require Ubuntu image with container support (publisher microsoft-azure-batch; offer microsoft-azure-batch)
749+
# We require Ubuntu image with container support
752750
# Get the latest SKU by inspecting output of `az batch pool supported-images list` for publisher+offer
753751
# Update node_agent_sku_id (below), if necessary
754752
image_reference = batch_models.ImageReference(
755-
publisher="microsoft-azure-batch",
756-
offer="ubuntu-server-container",
757-
sku="20-04-lts",
753+
publisher="microsoft-dsvm",
754+
offer="ubuntu-hpc",
755+
sku="2204",
758756
version="latest",
759757
)
760758

761759
virtual_machine_configuration = batch_models.VirtualMachineConfiguration(
762760
image_reference=image_reference,
763761
container_configuration=container_conf,
764-
node_agent_sku_id="batch.node.ubuntu 20.04",
762+
node_agent_sku_id="batch.node.ubuntu 22.04",
765763
)
766764

767765
auto_scale_formula = f"""

0 commit comments

Comments
 (0)