diff --git a/.github/workflows/build-core-template.yml b/.github/workflows/build-core-template.yml index 453333ca4c88..9a6587b189e4 100644 --- a/.github/workflows/build-core-template.yml +++ b/.github/workflows/build-core-template.yml @@ -42,6 +42,7 @@ jobs: - external-node - contract-verifier - cross-external-nodes-checker + - snapshots-creator steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: diff --git a/docker/snapshots-creator/Dockerfile b/docker/snapshots-creator/Dockerfile new file mode 100644 index 000000000000..897f28f87800 --- /dev/null +++ b/docker/snapshots-creator/Dockerfile @@ -0,0 +1,28 @@ +# syntax=docker/dockerfile:experimental +FROM debian:bookworm-slim as builder + +WORKDIR /usr/src/zksync +COPY . . + +RUN apt-get update && apt-get install -y curl clang openssl libssl-dev gcc g++ \ + pkg-config build-essential libclang-dev linux-libc-dev liburing-dev && \ + rm -rf /var/lib/apt/lists/* + +ENV RUSTUP_HOME=/usr/local/rustup \ + CARGO_HOME=/usr/local/cargo \ + PATH=/usr/local/cargo/bin:$PATH + +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \ + rustup install nightly-2023-08-21 && \ + rustup default nightly-2023-08-21 + +RUN cargo build --release --bin snapshots_creator + +FROM debian:bookworm-slim + +RUN apt-get update && apt-get install -y curl libpq5 liburing-dev ca-certificates && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /usr/src/zksync/target/release/snapshots_creator /usr/bin + +ENTRYPOINT ["snapshots_creator"] diff --git a/infrastructure/zk/src/docker.ts b/infrastructure/zk/src/docker.ts index dbb598da3106..c0c45c918a50 100644 --- a/infrastructure/zk/src/docker.ts +++ b/infrastructure/zk/src/docker.ts @@ -17,7 +17,8 @@ const IMAGES = [ 'prover-gpu-fri', 'witness-vector-generator', 'prover-fri-gateway', - 'proof-fri-compressor' + 'proof-fri-compressor', + 'snapshots-creator' ]; const UNIX_TIMESTAMP = Date.now(); @@ -78,7 +79,8 @@ function defaultTagList(image: string, imageTagSha: string, imageTagShaTS: strin 'prover-gpu-fri', 'witness-vector-generator', 'prover-fri-gateway', - 'proof-fri-compressor' + 'proof-fri-compressor', + 'snapshots-creator' ].includes(image) ? ['latest', 'latest2.0', `2.0-${imageTagSha}`, `${imageTagSha}`, `2.0-${imageTagShaTS}`, `${imageTagShaTS}`] : [`latest2.0`, 'latest'];