Skip to content

Download container image from Amazon ECR

The container image in Amazon ECR can be easily obtained with singularity command of SingularityPRO.

Usage

Load environment module to use SingularityPRO and Amazon ECR.

Note

This procedure assumes that you have completed Register access token in AWS CLI.

[username@es1 ~]$ module load singularitypro aws-cli

Set AWS authentication information in environment variable.

$ export SINGULARITY_DOCKER_USERNAME=AWS
$ export SINGULARITY_DOCKER_PASSWORD=`aws ecr get-login-password`

Set URL of repository in shell variable.

[username@es1 ~]$ repositoryUrl=`aws ecr describe-repositories --repository-names TEST/SAMPLE | jq -r '.repositories[0].repositoryUri'`

Get container image.

[username@es1 ~]$ singularity pull docker://${repositoryUrl}