Hi,
you can use AWS Batch to execute OMA. You can use AWS Batch Array Jobs for parallelization and use Amazon EFS as filesystem. You can also use Amazon FSx for Lustre if you need higher filesystem performance. You can avoid throttling of Docker Hub image pulls by using Amazon Elastic Container Registry (ECR). It is also recommended to build your own up-to-date container image to improve security. The OMA repository contains the required Dockerfile.
I have tested the OMA ToyExample first stage with AWS Batch using below AWS Batch Job Definition. The command in the job definition uses AWS Batch environment variables to set THIS_PROC_NR
as recommended by Adrian. You need to set NR_PROCESSES
to the AWS Batch Array Size specified at job launch; I used an array size of 6 and set NR_PROCESSES=6
accordingly.
Best regards,
Stefan
{
"jobDefinitionName": "oma-test",
"jobDefinitionArn": "<removed>",
"revision": 1,
"status": "ACTIVE",
"type": "container",
"parameters": {},
"retryStrategy": {
"attempts": 1,
"evaluateOnExit": []
},
"containerProperties": {
"image": "dessimozlab/oma_standalone:latest",
"command": [
"sh",
"-c",
"export NR_PROCESSES=6; export THIS_PROC_NR=$((AWS_BATCH_JOB_ARRAY_INDEX+1)); echo Number of processes; echo $NR_PROCESSES; echo This process; echo $THIS_PROC_NR; echo Starting OMA ;oma -s; echo OMA completed; cd /; umount /oma"
],
"volumes": [
{
"name": "data-volume",
"efsVolumeConfiguration": {
"fileSystemId": "<yourEFSfilesystem>",
"rootDirectory": "data/dc"
}
}
],
"environment": [],
"mountPoints": [
{
"containerPath": "/oma",
"readOnly": false,
"sourceVolume": "data-volume"
}
],
"readonlyRootFilesystem": false,
"privileged": true,
"ulimits": [],
"resourceRequirements": [
{
"value": "2",
"type": "VCPU"
},
{
"value": "2048",
"type": "MEMORY"
}
],
"linuxParameters": {
"devices": [],
"initProcessEnabled": false,
"tmpfs": []
},
"logConfiguration": {
"logDriver": "awslogs",
"options": {},
"secretOptions": []
},
"secrets": []
},
"timeout": {
"attemptDurationSeconds": 300
},
"tags": {},
"platformCapabilities": [
"EC2"
],
"containerOrchestrationType": "ECS"
}
Yes, most things are possible on AWS.
I highly highly doubt that.
See this post.