-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding script and SIF asset collection id to run a version of laser o…
…n COMPS.
- Loading branch information
Jonathan Bloedow
committed
Jul 3, 2024
1 parent
2eae9c5
commit 5553728
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f3307b5d-c738-ef11-aa15-9440c9be2c51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |