# Final image for chainswarm-analyzers-baseline
# Built on base image, compiles Rust code and installs package
# Published to: ghcr.io/chainswarm/analyzers-baseline:latest

ARG BASE_IMAGE=ghcr.io/chainswarm/analyzers-base:latest
FROM ${BASE_IMAGE}

LABEL org.opencontainers.image.source="https://github.com/chainswarm/analyzers-baseline"
LABEL org.opencontainers.image.description="Rust-powered blockchain analytics with GPU acceleration"

WORKDIR /app

# Copy package files
COPY pyproject.toml Cargo.toml Cargo.lock README.md ./
COPY rust/ ./rust/
COPY src/ ./src/

# Build and install the package with maturin
# This compiles the Rust extension and installs the Python package
RUN maturin build --release && \
    pip install --no-cache-dir target/wheels/*.whl

# Default entrypoint - list available commands
ENTRYPOINT ["python", "-m", "chainswarm_analyzers_baseline"]
CMD ["--help"]
