diff --git a/e2e/Dockerfile b/e2e/Dockerfile index 81d93904..e166dfd4 100644 --- a/e2e/Dockerfile +++ b/e2e/Dockerfile @@ -10,10 +10,14 @@ RUN npm run build FROM python:3.13-slim # Install system dependencies +# libblas-dev/liblapack-dev/liblapacke-dev are required by MLX CPU backend on Linux RUN apt-get update && apt-get install -y \ build-essential \ pkg-config \ libssl-dev \ + libblas-dev \ + liblapack-dev \ + liblapacke-dev \ curl \ protobuf-compiler \ iptables \ @@ -23,6 +27,13 @@ RUN apt-get update && apt-get install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly ENV PATH="/root/.cargo/bin:${PATH}" +# Wrap g++ with -fpermissive to fix MLX CPU JIT compilation with GCC 14 +# (GCC 14 treats _Float128/_Float32/_Float64 as built-in types, conflicting with MLX-generated code) +# Must be done BEFORE uv sync so any source builds also get the fix +RUN mv /usr/bin/g++ /usr/bin/g++.real && \ + printf '#!/bin/sh\nexec /usr/bin/g++.real -fpermissive "$@"\n' > /usr/bin/g++ && \ + chmod +x /usr/bin/g++ + # Install uv COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv @@ -44,10 +55,4 @@ COPY --from=dashboard /app/dashboard/build ./dashboard/build/ # to keep the layer small (Rust target/ and cargo registry can be 1-2 GB) RUN uv sync && rm -rf /app/rust/target /root/.cargo/registry /root/.cargo/git -# Wrap g++ with -fpermissive to fix MLX CPU JIT compilation with GCC 14 -# (GCC 14 treats _Float128/_Float32/_Float64 as built-in types, conflicting with MLX-generated code) -RUN mv /usr/bin/g++ /usr/bin/g++.real && \ - printf '#!/bin/sh\nexec /usr/bin/g++.real -fpermissive "$@"\n' > /usr/bin/g++ && \ - chmod +x /usr/bin/g++ - CMD [".venv/bin/exo", "-v"]