From 9080428ed427bb741317a807263329621c014a16 Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Fri, 23 Aug 2024 12:21:18 +0200 Subject: [PATCH] feat: Add prover-job-monitor Dockerfile and build rules (#2719) --- .github/workflows/build-prover-template.yml | 4 ++-- docker/prover-job-monitor/Dockerfile | 15 +++++++++++++++ infrastructure/zk/src/docker.ts | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 docker/prover-job-monitor/Dockerfile diff --git a/.github/workflows/build-prover-template.yml b/.github/workflows/build-prover-template.yml index 25bf14728dd6..7591c45b49e4 100644 --- a/.github/workflows/build-prover-template.yml +++ b/.github/workflows/build-prover-template.yml @@ -53,6 +53,7 @@ jobs: - prover-gpu-fri - witness-vector-generator - prover-fri-gateway + - prover-job-monitor - proof-fri-gpu-compressor outputs: protocol_version: ${{ steps.protocolversion.outputs.protocol_version }} @@ -163,7 +164,7 @@ jobs: run: | ci_run sccache --show-stats || true ci_run cat /tmp/sccache_log.txt || true - + copy-images: name: Copy images between docker registries needs: build-images @@ -197,4 +198,3 @@ jobs: docker buildx imagetools create \ --tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }} \ us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }} - diff --git a/docker/prover-job-monitor/Dockerfile b/docker/prover-job-monitor/Dockerfile new file mode 100644 index 000000000000..25d5dcd3af95 --- /dev/null +++ b/docker/prover-job-monitor/Dockerfile @@ -0,0 +1,15 @@ +FROM matterlabs/zksync-build-base:latest as builder + +ARG DEBIAN_FRONTEND=noninteractive + +WORKDIR /usr/src/zksync +COPY . . + +RUN cd prover && cargo build --release --bin zksync_prover_job_monitor + +FROM debian:bookworm-slim +RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /usr/src/zksync/prover/target/release/zksync_prover_job_monitor /usr/bin/ + +ENTRYPOINT ["/usr/bin/zksync_prover_job_monitor"] diff --git a/infrastructure/zk/src/docker.ts b/infrastructure/zk/src/docker.ts index 76576fd243cb..27de68d1d98d 100644 --- a/infrastructure/zk/src/docker.ts +++ b/infrastructure/zk/src/docker.ts @@ -12,6 +12,7 @@ const IMAGES = [ 'prover-gpu-fri', 'witness-vector-generator', 'prover-fri-gateway', + 'prover-job-monitor', 'proof-fri-gpu-compressor', 'snapshots-creator', 'verified-sources-fetcher' @@ -73,6 +74,7 @@ function defaultTagList(image: string, imageTagSha: string, imageTagShaTS: strin 'external-node', 'contract-verifier', 'prover-fri-gateway', + 'prover-job-monitor', 'snapshots-creator' ].includes(image) ? ['latest', 'latest2.0', `2.0-${imageTagSha}`, `${imageTagSha}`, `2.0-${imageTagShaTS}`, `${imageTagShaTS}`]