Skip to content

Commit

Permalink
feat: Dockerfile and step in CI to build snapshots-creator image (mat…
Browse files Browse the repository at this point in the history
  • Loading branch information
tomg10 authored Dec 15, 2023
1 parent 9b479a1 commit 70ca0db
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- external-node
- contract-verifier
- cross-external-nodes-checker
- snapshots-creator
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
Expand Down
28 changes: 28 additions & 0 deletions docker/snapshots-creator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
6 changes: 4 additions & 2 deletions infrastructure/zk/src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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'];
Expand Down

0 comments on commit 70ca0db

Please sign in to comment.