@@ -88,9 +88,10 @@ def scenario_run(scenario_file, draw_only, draw: tuple, output_dir=None):
88
88
@click .option ("--asserts-on" , type = bool , default = False , is_flag = True , help = "Enable assertions in simulation run." )
89
89
@click .option ("--more-memory" , type = bool , default = False , is_flag = True ,
90
90
help = "Request machine wth more memory (for larger population sizes)." )
91
+ @click .option ("--image-tag" , type = str , help = "Tag of the Docker image to use." )
91
92
@click .option ("--keep-pool-alive" , type = bool , default = False , is_flag = True , hidden = True )
92
93
@click .pass_context
93
- def batch_submit (ctx , scenario_file , asserts_on , more_memory , keep_pool_alive ):
94
+ def batch_submit (ctx , scenario_file , asserts_on , more_memory , keep_pool_alive , image_tag = None ):
94
95
"""Submit a scenario to the batch system.
95
96
96
97
SCENARIO_FILE is path to file containing scenario class.
@@ -180,8 +181,14 @@ def batch_submit(ctx, scenario_file, asserts_on, more_memory, keep_pool_alive):
180
181
password = config ["REGISTRY" ]["KEY" ],
181
182
)
182
183
183
- # Name of the image in the registry
184
- image_name = config ["REGISTRY" ]["SERVER" ] + "/" + config ["REGISTRY" ]["IMAGE_NAME" ]
184
+ # url of the docker image to run the tasks
185
+ image_name = f"{ config ['REGISTRY' ]['SERVER' ]} /{ config ['REGISTRY' ]['IMAGE' ]} "
186
+
187
+ # use the supplied image tag if provided, otherwise use the default
188
+ if image_tag is None :
189
+ image_name = f"{ image_name } :{ config ['REGISTRY' ]['DEFAULT_TAG' ]} "
190
+ else :
191
+ image_name = f"{ image_name } :{ image_tag } "
185
192
186
193
# Create container configuration, prefetching Docker images from the container registry
187
194
container_conf = batch_models .ContainerConfiguration (
0 commit comments