Recommended recipe for deploying a Julia app in Docker with efficient precompilation?

robsmith11
Mon, 06 Mar 2023 05:40:16 +0000
General Usage

Now that Julia 1.9/10 precompilation is doing more the first time a package is used, I’m seeing rather slow (7-8 minutes) restarts on a production docker image of my Julia app. When I run it locally with packages that have already been precompiled, the startup time is much faster.

Is there a recommended way to build Julia docker images that will

1. Do all precompilation during image creation rather than when a image is run, and

2. Cache as much dependency precompilation as possible, so that rebuilding a docker image only needs to update the precompilation for my app’s own code?

4 posts - 3 participants