docker-library / docker-library/julia
set `JULIA_CPU_TARGET` to avoid compilation overhead
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 93
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
If someone wishes to use this container and pre-load packages for their own, they may find that every time they run the container remotely, Julia spends time compiling before anything can happen.
This is because on an individual system Julia will just compile code for that specific architecture. A remote system with a slightly different architecture will trigger re-compilation.
To make the compilation that happens during container building stick, the JULIA_CPU_TARGET environment variable needs to be set to the generic string that is used to build Julia in the first place:
ENV JULIA_CPU_TARGET generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)
See: https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Julia Docker image build configuration and compare its build-time environment with the linked Julia sysimg documentation. Done means the image sets JULIA_CPU_TARGET to the requested generic multi-target value so packages preloaded during the build do not recompile on compatible remote architectures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, julia
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100