11# ndarray — Railway compile-test image
22# Verifies the HPC module builds cleanly (default + jit-native features)
3+ # Requires Rust 1.94.0 (LazyLock, simd_caps, modern std APIs)
34#
45# Build: docker build -t ndarray-test .
56# Run: docker run --rm ndarray-test
67
7- FROM rust:1.85 -slim AS builder
8+ FROM debian:bookworm -slim AS builder
89
9- WORKDIR /app
10-
11- # System deps for Cranelift JIT
10+ # System deps
1211RUN apt-get update && apt-get install -y --no-install-recommends \
13- pkg-config libssl-dev \
12+ curl ca-certificates gcc libc6-dev pkg-config libssl-dev \
1413 && rm -rf /var/lib/apt/lists/*
1514
15+ # Install Rust 1.94.0 via rustup
16+ ENV RUSTUP_HOME=/usr/local/rustup \
17+ CARGO_HOME=/usr/local/cargo \
18+ PATH=/usr/local/cargo/bin:$PATH
19+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
20+ sh -s -- -y --default-toolchain 1.94.0 --profile minimal \
21+ && rustc --version | grep -q "1.94.0"
22+
23+ WORKDIR /app
24+
1625# Copy workspace files first for layer caching
1726COPY Cargo.toml Cargo.lock ./
1827COPY ndarray-rand/Cargo.toml ndarray-rand/Cargo.toml
@@ -34,4 +43,4 @@ RUN cargo test --release --lib -- hpc:: 2>&1 && echo "=== HPC TESTS OK ==="
3443# Minimal runtime image — just proves it compiled
3544FROM debian:bookworm-slim
3645COPY --from=builder /app/target/release/libndarray.rlib /usr/local/lib/
37- CMD ["echo" , "ndarray build verified" ]
46+ CMD ["echo" , "ndarray build verified — Rust 1.94.0 " ]
0 commit comments