I create an empty Singularity image, split off the header, shrink the filesystem, and put everything back together.