Add GPU proving support in ere-openvm (#113)

This commit is contained in:
Han
2025-09-03 13:46:10 +08:00
committed by GitHub
parent 8fe61cad5b
commit 6a1855c7af
28 changed files with 466 additions and 198 deletions

View File

@@ -9,7 +9,10 @@ WORKDIR /ere
ARG ZKVM
ARG RUSTFLAGS="-Ctarget-cpu=native"
RUN RUSTFLAGS=${RUSTFLAGS} cargo build --release --package ere-cli --bin ere-cli --features cli,${ZKVM} && \
# If current environment is in CI or not.
ARG CI
RUN RUSTFLAGS=${RUSTFLAGS} cargo build --release --package ere-cli --bin ere-cli --features cli,${ZKVM} ${CI:+--no-default-features} && \
cp /ere/target/release/ere-cli /ere/ere-cli && \
cargo clean && \
rm -rf $CARGO_HOME/registry/src $CARGO_HOME/registry/cache

View File

@@ -5,6 +5,26 @@ FROM ${BASE_IMAGE_TAG}
# The ere-base image provides Rust, Cargo, and common tools.
# We operate as root for SDK installation.
# If current environment is in CI or not.
ARG CI
# Install CUDA Toolkit 12.9
# If argument `CI` is set, we skip the installation.
RUN [ -n "$CI" ] || \
(wget https://developer.download.nvidia.com/compute/cuda/repos/$(. /etc/os-release && echo "${ID}${VERSION_ID}" | tr -d '.')/$(uname -i)/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
rm cuda-keyring_1.1-1_all.deb && \
apt update && \
apt install -y cuda-toolkit-12-9 && \
apt-get clean && rm -rf /var/lib/apt/lists/*)
# Add nvcc to path
ENV PATH=/usr/local/cuda/bin:$PATH
# Default to build for RTX 50 series
ARG CUDA_ARCH=120
ENV CUDA_ARCH=${CUDA_ARCH}
# Copy the OpenVM SDK installer script from the workspace context
COPY scripts/sdk_installers/install_openvm_sdk.sh /tmp/install_openvm_sdk.sh
RUN chmod +x /tmp/install_openvm_sdk.sh