fix: compile all deps in CI image to resolve transitive compile deps
EXLA's cached_make needs Mix.Tasks.Compile.ElixirMake (from elixir_make), which must be compiled first. mix deps.compile exla alone doesn't handle transitive compile-time deps. Use mix deps.compile without args to compile in dependency order.
This commit is contained in:
parent
32b428f49b
commit
88c46b9c1d
1 changed files with 6 additions and 6 deletions
|
|
@ -38,13 +38,13 @@ COPY vendor /tmp/exla_warm/vendor
|
||||||
RUN mkdir -p /tmp/exla_warm/config && \
|
RUN mkdir -p /tmp/exla_warm/config && \
|
||||||
printf 'import Config\nconfig :nx, :default_backend, EXLA.Backend\n' > /tmp/exla_warm/config/config.exs
|
printf 'import Config\nconfig :nx, :default_backend, EXLA.Backend\n' > /tmp/exla_warm/config/config.exs
|
||||||
|
|
||||||
# Fetch deps and compile EXLA. xla must be compiled first — exla's
|
# Fetch and compile all deps. EXLA's cached_make compiler calls
|
||||||
# extract_xla compiler calls XLA.archive_path!/0 at build time.
|
# Mix.Tasks.Compile.ElixirMake at build time, which requires elixir_make
|
||||||
# mix deps.compile exla alone skips transitive deps, so we explicitly
|
# to be compiled first. mix deps.compile without arguments handles
|
||||||
# order xla → exla. The cached_make compiler then downloads the XLA
|
# dependency ordering automatically. The cached_make step downloads the
|
||||||
# archive, extracts it, compiles the C++ NIF, and caches libexla.so at
|
# XLA archive, compiles the C++ NIF, and caches libexla.so at
|
||||||
# ~/.cache/xla/exla/{cache_key}/libexla.so.
|
# ~/.cache/xla/exla/{cache_key}/libexla.so.
|
||||||
RUN mix deps.get && mix deps.compile xla && mix deps.compile exla
|
RUN mix deps.get && mix deps.compile
|
||||||
|
|
||||||
# Clean up the temp project — the cache in ~/.cache/xla/ persists in
|
# Clean up the temp project — the cache in ~/.cache/xla/ persists in
|
||||||
# the image and is what matters.
|
# the image and is what matters.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue