Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dockerfile and step in CI to build snapshots-creator image #686

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
tomg10 marked this conversation as resolved.
Show resolved Hide resolved

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