ReproNim / containers

Containers "distribution" for reproducible neuroimaging
Apache License 2.0
26 stars 14 forks source link

fmriprep-fake docker image breaks build process #91

Open yarikoptic opened 1 year ago

yarikoptic commented 1 year ago
[INFO    ] bids <- docker djarecka/fmriprep_fake                                                                                                                                     
ERROR MANIFEST_UNKNOWN: OCI index found, but accept header does not support OCI indexes                                                                                              
Traceback (most recent call last):                                                                                                                                                   
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 445, in <module>                                                                                      
    main()                                                                                                                                                                           
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 406, in main                                                                                          
    builder.generate_singularity_for_docker_image(dockerhubid, "bids")                                                                                                               
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 306, in generate_singularity_for_docker_image                                                         
    self.add_singularity_versioned_image(                                                                                                                                            
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 259, in add_singularity_versioned_image                                                               
    imagefile = singfile.build(self)                                                                                                                                                 
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 335, in build                                                                                         
    builder.runcmd(                                                                                                                                                                  
  File "/home/yoh/proj/repronim/containers/scripts/create_singularities", line 76, in runcmd                                                                                         
    return subprocess.run(args, **kwargs)                                                                                                                                            
  File "/usr/lib/python3.9/subprocess.py", line 528, in run                                                                                                                          
    raise CalledProcessError(retcode, process.args,                                                                                                                                  
subprocess.CalledProcessError: Command '('sudo', '--preserve-env=TMPDIR,SINGULARITY_TMPDIR', 'singularity', 'build',                                                                 
'/home/yoh/proj/repronim/containers/images/bids/bids-fmriprep-fake--0.1.0.sing.tmp', '/home/yoh/proj/repronim/containers/images/bids/Singularity.bids-fmriprep-fake--0.1.0')'        
returned non-zero exit status 1.           

I never encountered it before and have failed to google my way out yet. @asmacdo - any ideas or experiences like this in the past?

asmacdo commented 1 year ago

what command did you use to run this? to me it looks like something is attempting to pull from an image registry but the request isn't right.

asmacdo commented 1 year ago

Heres my guess from only briefly reading over the relevant code: When we don't already have the image singularity should pull docker://djareka/fakemri_prep. However, the Content-Headers requirement (IIRC) is relatively new.

Do you happen to have singularity 2.6?

Apparently that doesnt work :) https://github.com/ReproNim/containers/blob/master/scripts/create_singularities#L332-L333

If that's the problem (or close), the workaround should be to docker pull djareka/fakemri_prep before you run this command.

yarikoptic commented 1 year ago

Thanks for looking into it. it is indeed the "good old" 2.6.1-dist singularity on smaug. I kept it that old to provide maximal compatibility with newer ones since new singularity could read it but old could not read new images

asmacdo commented 1 year ago

If you're interested in extra details, heres docs for the registry v2 API call that uses the accept headers (added 2016 or so)