mirror of
https://github.com/eth-act/ere.git
synced 2026-02-19 11:54:42 -05:00
71 lines
2.3 KiB
Docker
71 lines
2.3 KiB
Docker
ARG BASE_IMAGE=ere-base:latest
|
|
|
|
FROM $BASE_IMAGE
|
|
|
|
# The ere-base image provides Rust, Cargo, and common tools.
|
|
# ZisK requires Ubuntu 22.04 or higher (ere-base uses 24.04 by default).
|
|
# We operate as root for SDK and dependency installation.
|
|
|
|
# Whether to enable CUDA feature or not.
|
|
ARG CUDA
|
|
|
|
# Install ZisK system dependencies (for Ubuntu)
|
|
# Taken from https://0xpolygonhermez.github.io/zisk/getting_started/installation.html
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
xz-utils \
|
|
# jq is in ere-base
|
|
# curl is in ere-base
|
|
# build-essential is in ere-base
|
|
qemu-system \
|
|
libomp-dev \
|
|
libgmp-dev \
|
|
nlohmann-json3-dev \
|
|
# protobuf-compiler is in ere-base
|
|
uuid-dev \
|
|
libgrpc++-dev \
|
|
libsecp256k1-dev \
|
|
libsodium-dev \
|
|
libpqxx-dev \
|
|
nasm \
|
|
libopenmpi-dev \
|
|
openmpi-bin \
|
|
openmpi-common \
|
|
libclang-dev \
|
|
clang \
|
|
# Needed for /usr/include/google/protobuf/timestamp.proto
|
|
libprotobuf-dev \
|
|
gcc-riscv64-unknown-elf \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Default to build for RTX 50 series
|
|
ARG CUDA_ARCH=sm_120
|
|
|
|
# Copy the ZisK SDK installer script from the workspace context
|
|
COPY --chmod=755 scripts/sdk_installers/install_zisk_sdk.sh /tmp/install_zisk_sdk.sh
|
|
|
|
# Run the ZisK SDK installation script using ziskup.
|
|
# This script installs the 'zisk' Rust toolchain and `cargo-zisk`
|
|
RUN /tmp/install_zisk_sdk.sh && \
|
|
rm /tmp/install_zisk_sdk.sh && \
|
|
# Remove the merkle tree of proving key to reduce docker image size (~20 GB).
|
|
# Re-generating takes only ~30 seconds.
|
|
find "/root/.zisk/provingKey" -name "*.consttree" -type f -delete
|
|
|
|
# The 'zisk' Rust toolchain is now installed.
|
|
# cargo-zisk is installed in /root/.zisk/bin.
|
|
# The ziskup script adds /root/.zisk/bin to PATH for its session.
|
|
# For the image environment, we need to ensure /root/.zisk/bin is persistently in PATH.
|
|
ENV PATH=/root/.zisk/bin:$PATH
|
|
|
|
# Verify cargo-zisk is accessible
|
|
RUN echo "Verifying ZisK installation in Dockerfile ..." && cargo-zisk --version
|
|
|
|
# Copy the TamaGo installer script from the workspace context
|
|
COPY --chmod=755 scripts/install_tamago.sh /tmp/install_tamago.sh
|
|
|
|
# Run the TamaGo installation script.
|
|
RUN /tmp/install_tamago.sh && \
|
|
rm /tmp/install_tamago.sh
|
|
|
|
CMD ["/bin/bash"]
|