docker-library / docker-library/julia

set `JULIA_CPU_TARGET` to avoid compilation overhead

Open
#79 3 comments 2 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.