mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-28 01:03:25 +00:00
fix: add r0vm and logos circuits in indexer image
This commit is contained in:
parent
67f49697f7
commit
1f01f7c06a
@ -3,13 +3,43 @@ FROM lukemathwalker/cargo-chef:latest-rust-1.91.1-slim-trixie AS chef
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
libclang-dev \
|
||||
clang \
|
||||
cmake \
|
||||
ninja-build \
|
||||
curl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install r0vm
|
||||
# Use quick install for x86-64 (risczero provides binaries only for this linux platform)
|
||||
# Manual build for other platforms (including arm64 Linux)
|
||||
RUN ARCH=$(uname -m); \
|
||||
if [ "$ARCH" = "x86_64" ]; then \
|
||||
echo "Using quick install for $ARCH"; \
|
||||
curl -L https://risczero.com/install | bash; \
|
||||
export PATH="/root/.cargo/bin:/root/.risc0/bin:${PATH}"; \
|
||||
rzup install; \
|
||||
else \
|
||||
echo "Using manual build for $ARCH"; \
|
||||
git clone --depth 1 --branch release-3.0 https://github.com/risc0/risc0.git; \
|
||||
git clone --depth 1 --branch r0.1.91.1 https://github.com/risc0/rust.git; \
|
||||
cd /risc0; \
|
||||
cargo install --path rzup; \
|
||||
rzup build --path /rust rust --verbose; \
|
||||
cargo install --path risc0/cargo-risczero; \
|
||||
fi
|
||||
ENV PATH="/root/.cargo/bin:/root/.risc0/bin:${PATH}"
|
||||
RUN cp "$(which r0vm)" /usr/local/bin/r0vm
|
||||
RUN test -x /usr/local/bin/r0vm
|
||||
RUN r0vm --version
|
||||
|
||||
# Install logos blockchain circuits
|
||||
RUN curl -sSL https://raw.githubusercontent.com/logos-blockchain/logos-blockchain/main/scripts/setup-logos-blockchain-circuits.sh | bash
|
||||
|
||||
WORKDIR /indexer_service
|
||||
|
||||
# Planner stage - generates dependency recipe
|
||||
@ -48,6 +78,12 @@ RUN useradd -m -u 1000 -s /bin/bash indexer_service_user && \
|
||||
# Copy binary from builder
|
||||
COPY --from=builder --chown=indexer_service_user:indexer_service_user /indexer_service/target/release/indexer_service /usr/local/bin/indexer_service
|
||||
|
||||
# Copy r0vm binary from builder
|
||||
COPY --from=builder --chown=indexer_service_user:indexer_service_user /usr/local/bin/r0vm /usr/local/bin/r0vm
|
||||
|
||||
# Copy logos blockchain circuits from builder
|
||||
COPY --from=builder --chown=indexer_service_user:indexer_service_user /root/.logos-blockchain-circuits /home/indexer_service_user/.logos-blockchain-circuits
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY indexer/service/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user