Is it possible to make precompilation portable (for docker images built with a different CPU)?

I recently realized why my docker images were taking ages to restart on production servers, but were much faster on dev servers (which happen to have the same CPU as the build servers). Precompilation is being done and saved during the building of docker images, but it looks like it’s only being used when run on servers with the same CPU family as the one on which they were built… which makes sense.

So is there any way to force precompilation to be done in a more portable way so that it will run on both recent Xeon and Ryzen servers?

1 Like

Found a solution:

ENV JULIA_CPU_TARGET haswell,clone_all