mirror of
https://github.com/eth-act/ere.git
synced 2026-02-19 11:54:42 -05:00
35 lines
980 B
Docker
35 lines
980 B
Docker
ARG BASE_ZKVM_IMAGE=ere-base-openvm:latest
|
|
ARG BASE_ZKVM_CUDA_IMAGE=ere-base-openvm:latest-cuda
|
|
ARG RUNTIME_IMAGE=ubuntu:24.04
|
|
ARG RUNTIME_CUDA_IMAGE=nvidia/cuda:12.9.1-runtime-ubuntu24.04
|
|
|
|
# Whether to enable CUDA feature or not.
|
|
ARG CUDA
|
|
|
|
FROM $BASE_ZKVM_IMAGE AS base
|
|
FROM $BASE_ZKVM_CUDA_IMAGE AS base_cuda
|
|
FROM base${CUDA:+_cuda} AS build_stage
|
|
|
|
COPY . /ere
|
|
|
|
WORKDIR /ere
|
|
|
|
ARG CUDA
|
|
ARG RUSTFLAGS
|
|
|
|
RUN cargo build --release --package ere-server --bin ere-server --features openvm${CUDA:+,cuda} \
|
|
&& mkdir bin && mv target/release/ere-server bin/ere-server \
|
|
&& cargo clean && rm -rf $CARGO_HOME/registry/src $CARGO_HOME/registry/cache
|
|
|
|
FROM $RUNTIME_IMAGE AS runtime
|
|
FROM $RUNTIME_CUDA_IMAGE AS runtime_cuda
|
|
FROM runtime${CUDA:+_cuda} AS runtime_stage
|
|
|
|
# Copy OpenVM SDK
|
|
COPY --from=build_stage /root/.openvm/agg_stark.pk /root/.openvm/agg_stark.pk
|
|
|
|
# Copy ere-server
|
|
COPY --from=build_stage /ere/bin/ere-server /ere/bin/ere-server
|
|
|
|
ENTRYPOINT ["/ere/bin/ere-server"]
|