Skip to content

Download container image from Amazon ECR

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

Note

refer to Singularity Global Client when using Singularity 2.6.1.

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/3.5 aws-cli/2.0

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}