1e52c837c8
- Added native addon distribution and installation support to the CLI update mechanism, enabling platform-specific native modules to be downloaded and installed alongside the main binary. - Added platform validation in native addon loader to verify supported platforms (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64) with helpful error messages for unsupported configurations. - Enhanced native addon loading error messages to provide platform-specific troubleshooting guidance for both npm/bun installations and local development environments. - Updated installation scripts (install.sh, install.ps1) to download and install native addon files alongside the main binary during CLI installation.
31 lines
912 B
Docker
31 lines
912 B
Docker
# Test binary build from local source
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y curl ca-certificates unzip build-essential && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install bun
|
|
RUN curl -fsSL https://bun.sh/install | bash
|
|
ENV PATH="/root/.bun/bin:$PATH"
|
|
|
|
# Install Rust
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
|
|
ENV PATH="/root/.cargo/bin:$PATH"
|
|
|
|
# Copy local repo
|
|
WORKDIR /repo
|
|
COPY . .
|
|
|
|
# Build native addon and binary
|
|
RUN bun install --frozen-lockfile
|
|
RUN bun --cwd=packages/natives run build:native
|
|
RUN cd packages/coding-agent && bun run build:binary
|
|
|
|
# Install binary and native addon to PATH
|
|
RUN mkdir -p /root/.local/bin && \
|
|
cp packages/coding-agent/dist/omp /root/.local/bin/ && \
|
|
cp packages/natives/native/pi_natives.linux-x64.node /root/.local/bin/
|
|
ENV PATH="/root/.local/bin:$PATH"
|
|
|
|
# Verify
|
|
RUN omp --version
|