Commit 99d3064
authored
Specify multiple architectures for Julia to precompile to (#2044)
* Specify multiple architectures for Julia to precompile to
For amd64 (x86_64), we should specify what specific targets the
precompilation should be done for. If we don't specify it,
it's *only* done for the target of the host doing the compilation.
When the container runs on a host that's still x86_64, but
a *different* generation of CPU than what the build host was, the
precompilation is useless and Julia takes a long long time to start
up. This specific multitarget comes from
https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets,
and is the same set of options that the official Julia x86_64 build is
compiled with. If the architecture the container runs on is
different, precompilation may still have to be re-done on first
startup - but this *should* catch most of the issues.
h/t to
https://discourse.julialang.org/t/is-it-possible-to-make-precompilation-portable-for-docker-images-built-with-a-different-cpu/95913
which helped point me towards `JULIA_CPU_TARGET`.
Fixes #2015 for more information
* Fix bash syntax issue
* Add JULIA_CPU_TARGET for aarch64 as well
- Don't need `export` as this is only used within this
script
- Steal from upstream what should be setup for aarch64
* Re-add export for JULIA_CPU_TARGET
Quietens pre-commit1 parent d91bb62 commit 99d3064
File tree
1 file changed
+22
-0
lines changed- images/minimal-notebook/setup-scripts
1 file changed
+22
-0
lines changedLines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
8 | 30 | | |
9 | 31 | | |
10 | 32 | | |
| |||
0 commit comments