cannot pull images from AWS ECR

371 views
Skip to first unread message

Evan Bollig PhD

unread,
Sep 20, 2018, 3:45:17 PM9/20/18
to singularity
I need help to get Singularity to work with AWS ECR container (Docker) images. 

I am using this pattern: 

eval $( aws ecr get-login --no-include-email ) export SINGULARITY_DOCKER_USERNAME=AWS export SINGULARITY_DOCKER_PASSWORD=[...] singularity run -vvv -x -d docker://XXXX.dkr.ecr.us-east-1.amazonaws.com/YYYY:ZZZZ

I am properly logged into Docker and can pull the image with Docker pull. However, leveraging the password in SINGULARITY_DOCKER_PASSWORD gives me: 

[...]
*** STARTING DOCKER IMPORT PYTHON  ****
DEBUG Docker layers and metadata will be written to: /tmp/.singularity-layers.MljARLQ9
VERBOSE2 SINGULARITY_DOCKER_USERNAME found as AWS
VERBOSE2 SINGULARITY_DOCKER_PASSWORD found
DEBUG Starting Docker IMPORT, includes env, runscript, and metadata.
VERBOSE2 Specified Docker ENTRYPOINT as %runscript.
DEBUG Headers found: Content-Type,Accept
VERBOSE Namespace: 
VERBOSE Repo Name: YYYY
VERBOSE Repo Tag: ZZZZ
VERBOSE Version: None
DEBUG Http Error with code 401
DEBUG update_token: challenge = 'Basic realm="https://XXXX.dkr.ecr.us-east-1.amazonaws.com/",service="ecr.amazonaws.com"'
ERROR Unrecognized authentication challenge, exiting.
+++ RETVAL=1
+++ '[' 1 -ne 0 ']'
+++ exit 1


Perhaps this is already fixed in another version of Singularity, but if so, which? My institution relies on the CentOS RPM version 2.6.0-dist. If this requires building singularity from source, I will need to know which version they should target. 

Evan Bollig PhD

unread,
Sep 27, 2018, 10:59:25 AM9/27/18
to singu...@lbl.gov
Bump. Still looking for feedback on this. 

Cheers,
-E

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
--
--
Evan F. Bollig, PhD
Senior Scientific Computing Consultant, Application Developer | Scientific Computing Solutions (SCS)
Minnesota Supercomputing Institute | msi.umn.edu
University of Minnesota | umn.edu
boll...@umn.edu | 612-624-1447 | Walter Lib Rm 556

Evan Bollig PhD

unread,
Oct 3, 2018, 12:38:30 PM10/3/18
to singu...@lbl.gov
Bump
--
Evan F. Bollig, PhD
Senior Scientific Computing Consultant, Application Developer |
Scientific Computing Solutions (SCS)
Minnesota Supercomputing Institute | msi.umn.edu
University of Minnesota | umn.edu
boll...@umn.edu | 612-624-1447 | Walter Lib Rm 556

On Thu, Sep 20, 2018 at 2:45 PM Evan Bollig PhD <boll...@umn.edu> wrote:
>

Levi Baber

unread,
Oct 3, 2018, 12:46:44 PM10/3/18
to singu...@lbl.gov
A workaround I've used for other private registries: pull to a local docker first, then use https://github.com/singularityware/docker2singularity to convert the local docker image to singularity.

Evan Bollig PhD

unread,
Oct 3, 2018, 12:54:11 PM10/3/18
to singu...@lbl.gov
Thanks Levi. That looks like it could get me an simg that I can push
to the cluster.

It will be nice if singularity v3.0.0 supports ECR directly. Also
hopeful that the authentication will prompt me for a username and
password rather than require exporting a password to my environment or
listing it on the command line.

Cheers,
-E
--
Evan F. Bollig, PhD
Senior Scientific Computing Consultant, Application Developer |
Scientific Computing Solutions (SCS)
Minnesota Supercomputing Institute | msi.umn.edu
University of Minnesota | umn.edu
boll...@umn.edu | 612-624-1447 | Walter Lib Rm 556

v

unread,
Oct 3, 2018, 1:07:59 PM10/3/18
to singu...@lbl.gov
Just FYI this is fixed for Singularity Registry Client :)


When you pull make sure to ask for the full URI, eg

sregistry pull aws://library/ubuntu:tag

And please follow the setup instructions carefully - you do need to provide your credentials the first time, and to install awscli. And the one issue so far is that parsing an incomplete uri (for example missing the collection) can lead to an error.

Please post any other issues that you might have on the issues board and I would be happy to help, or if you'd like to contribute to make the client better this is also great! Happy Hacktoberfest! 🎃

Reply all
Reply to author
Forward
0 new messages