Vanessasaurus
Vanessasaurus
I already have a function in my package library for singularity-python that uses hashlib to something like this for singularity hub, eg: ```python def get_image_hash(image_path): '''get_image_hash will return an md5...
I think it reads it in binary chunks (of size 4096) and updates the hashlib md5 sum thing with the new chunk. Then at the end, you get the hexdigest!...
yeah I learned this when I used the function on 100 identical images and got different results, and then :scream:
could you expand on "select certain paths?" Which ones wouldn't be selected?
hmm, but I would argue the opposite - custom user software is probably not going to be where it's supposed to be, because, you know, we're terrible at that :)...
I think the content hash is to see if "the guts of my thing are the same as your thing" - the use case I have now is generating and...
ok I just came up with a really retarded way of doing this, but I think it's a reasonable approach to start with - basically I create a tar archive...
oh and here is my rough scratch code for the function, don't worry will clean this up and optimize to probably not iterate over ALL files :) ```python import hashlib...
hey @hisplan ! We had originally intended this to be part of Singularity proper, and at one point @gmkurtzer added a random uuid generation (not a hash) but I don't...
The work I was doing wound up [here](https://github.com/singularityware/singularity-python/blob/master/singularity/reproduce.py#L496) and for that specific function, I was using md5. Likely for the image we should use sha256. Container comparison is interesting because...