dnanexus-rnd / GLnexus

Scalable gVCF merging and joint variant calling for population sequencing projects
Apache License 2.0
145 stars 37 forks source link

create truly static binary with alpine+musl #183

Closed brentp closed 4 years ago

brentp commented 4 years ago

this uses alpine linux to create a truly static binary. I sorta cargo-culted it together, but I've checked it on multiple systems where the distributed binary fails and the glnexus_static binary just works.

of note, the glnexus_static binary weighs in at an impressive 164MB. But it can be strip ed down to 6.9 MB.

mlin commented 4 years ago

Thanks @brentp, this looks really promising and helpful! I do also plan to make the lightweight docker image as we discussed.

I have one question before we proceed to polishing. Does this way of compiling the static binary still let us dynamically link in jemalloc at runtime? This is really important for good performance whilst running at high thread counts, in our experience. If we can't inject it with LD_PRELOAD as usual then we'll need to figure out some other way to link it and make sure it gets used as the default malloc() everywhere (including the linked dependencies like htslib, RocksDB, etc.)

brentp commented 4 years ago

ah yeah. should have mentioned that explicitly. seems to be some issue (that's above my head) with musl and injecting another malloc. also jemalloc has been removed from alpine.

let me look into it.

Even so, for me this is the difference between having a slower GLnexus and having no GLnexus.

brentp commented 4 years ago

closing in favor of: quay.io/mlin/glnexus