-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.gnark-ffi
More file actions
34 lines (23 loc) · 823 Bytes
/
Dockerfile.gnark-ffi
File metadata and controls
34 lines (23 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM golang:1.22 AS go-builder
FROM rustlang/rust:nightly-bullseye-slim AS rust-builder
# Dependencies
RUN apt update && apt install -y clang
# Install Go 1.22
COPY --from=go-builder /usr/local/go /usr/local/go
ENV PATH="/usr/local/go/bin:$PATH"
WORKDIR /sp1
# Install Rust toolchain
COPY ./rust-toolchain /sp1/rust-toolchain
RUN rustup show
# Copy repo
COPY . /sp1
# Build the gnark-ffi CLI
WORKDIR /sp1/crates/recursion/gnark-cli
RUN \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/sp1/target \
cargo build --release && cp ../../../target/release/sp1-recursion-gnark-cli /gnark-cli
FROM rustlang/rust:nightly-bullseye-slim
COPY --from=rust-builder /gnark-cli /gnark-cli
LABEL org.opencontainers.image.source=https://github.com/succinctlabs/sp1
ENTRYPOINT ["/gnark-cli"]