Skip to content

set JULIA_CPU_TARGET to avoid compilation overhead #79

@BioTurboNick

Description

@BioTurboNick

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions