Skip to content

Commit

Permalink
ci: Add docker and build rules for prover-autoscaler (#3069)
Browse files Browse the repository at this point in the history
## What ❔

Add Dockerfile and build rules for prover-autoscaler.
<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

To build prover-autoscaler image.
<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk_supervisor fmt` and `zk_supervisor
lint`.
  • Loading branch information
yorik authored Oct 11, 2024
1 parent 748ee1b commit 0841f1e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/new-build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ on:
jobs:
get-protocol-version:
name: Get protocol version
runs-on: [ matterlabs-ci-runner-high-performance ]
runs-on: [matterlabs-ci-runner-high-performance]
outputs:
protocol_version: ${{ steps.protocolversion.outputs.protocol_version }}
steps:
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
needs: get-protocol-version
env:
PROTOCOL_VERSION: ${{ needs.get-protocol-version.outputs.protocol_version }}
runs-on: [ matterlabs-ci-runner-high-performance ]
runs-on: [matterlabs-ci-runner-high-performance]
strategy:
matrix:
components:
Expand All @@ -96,6 +96,7 @@ jobs:
- prover-fri-gateway
- prover-job-monitor
- proof-fri-gpu-compressor
- prover-autoscaler
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down Expand Up @@ -166,7 +167,7 @@ jobs:
copy-images:
name: Copy images between docker registries
needs: [ build-images, get-protocol-version ]
needs: [build-images, get-protocol-version]
env:
PROTOCOL_VERSION: ${{ needs.get-protocol-version.outputs.protocol_version }}
runs-on: matterlabs-ci-runner
Expand Down
25 changes: 25 additions & 0 deletions docker/prover-autoscaler/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ghcr.io/matter-labs/zksync-build-base:latest AS builder

ARG DEBIAN_FRONTEND=noninteractive

# set of args for use of sccache
ARG SCCACHE_GCS_BUCKET=""
ARG SCCACHE_GCS_SERVICE_ACCOUNT=""
ARG SCCACHE_GCS_RW_MODE=""
ARG RUSTC_WRAPPER=""

ENV SCCACHE_GCS_BUCKET=${SCCACHE_GCS_BUCKET}
ENV SCCACHE_GCS_SERVICE_ACCOUNT=${SCCACHE_GCS_SERVICE_ACCOUNT}
ENV SCCACHE_GCS_RW_MODE=${SCCACHE_GCS_RW_MODE}
ENV RUSTC_WRAPPER=${RUSTC_WRAPPER}

WORKDIR /usr/src/zksync
COPY . .

RUN cd prover && cargo build --release --bin zksync_prover_autoscaler

FROM ghcr.io/matter-labs/zksync-runtime-base:latest

COPY --from=builder /usr/src/zksync/prover/target/release/zksync_prover_autoscaler /usr/bin/

ENTRYPOINT ["/usr/bin/zksync_prover_autoscaler"]

0 comments on commit 0841f1e

Please sign in to comment.