From 88c46b9c1d239c857560ba7c8c115518f1ea92bf Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 5 Aug 2026 09:26:16 -0500 Subject: [PATCH] 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. --- Dockerfile.ci | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.ci b/Dockerfile.ci index 6c9dbc8f..424e8996 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -38,13 +38,13 @@ COPY vendor /tmp/exla_warm/vendor RUN mkdir -p /tmp/exla_warm/config && \ 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 -# extract_xla compiler calls XLA.archive_path!/0 at build time. -# mix deps.compile exla alone skips transitive deps, so we explicitly -# order xla → exla. The cached_make compiler then downloads the XLA -# archive, extracts it, compiles the C++ NIF, and caches libexla.so at +# Fetch and compile all deps. EXLA's cached_make compiler calls +# Mix.Tasks.Compile.ElixirMake at build time, which requires elixir_make +# to be compiled first. mix deps.compile without arguments handles +# dependency ordering automatically. The cached_make step downloads the +# XLA archive, compiles the C++ NIF, and caches libexla.so at # ~/.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 # the image and is what matters.