Skip to content

Commit

Permalink
Adding script and SIF asset collection id to run a version of laser o…
Browse files Browse the repository at this point in the history
…n COMPS.
  • Loading branch information
Jonathan Bloedow committed Jul 3, 2024
1 parent 2eae9c5 commit 5553728
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions jb/laser.id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f3307b5d-c738-ef11-aa15-9440c9be2c51
30 changes: 30 additions & 0 deletions jb/run_laser_on_comps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import os
import sys

from idmtools.assets import AssetCollection
from idmtools.core.platform_factory import Platform
from idmtools.entities import CommandLine
from idmtools.entities.command_task import CommandTask
from idmtools.entities.experiment import Experiment

if __name__ == "__main__":
here = os.path.dirname(__file__)

# Create a platform to run the workitem
platform = Platform("CALCULON")

# create commandline input for the task
command = CommandLine("singularity exec ./Assets/laser.sif python3 -m idmlaser.measles")
task = CommandTask(command=command)
# Add our image
task.common_assets.add_assets(AssetCollection.from_id_file("laser.id"))
task.common_assets.add_directory('inputs_ew')

experiment = Experiment.from_task(
task,
name=os.path.split(sys.argv[0])[1],
tags=dict(type='singularity', description='laser')
)
experiment.run(wait_until_done=True)
if experiment.succeeded:
experiment.to_id_file("experiment.id")

0 comments on commit 5553728

Please sign in to comment.