-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add fflonk setup key for proof-fri-gpu-compressor (#3426)
## What ❔ Add fflonk key for proof fri GPU compressor ## Why ❔ New version require it ## 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). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
- Loading branch information
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build Proof FRI GPU Compressor with builtin setup fflonk key | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image_tag_suffix: | ||
description: "Commit sha or git tag for Docker tag" | ||
required: true | ||
type: string | ||
setup_keys_id: | ||
description: "Commit sha for downloading setup data from bucket dir" | ||
required: true | ||
type: string | ||
protocol_version: | ||
description: "Protocol version to be included in the images tag" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Build proof FRI GPU Compressor gar | ||
runs-on: [matterlabs-ci-runner-high-performance] | ||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Download FFLONK key and setup data | ||
run: | | ||
gsutil -m rsync -r gs://matterlabs-setup-keys-us/setup-keys/setup_fflonk_compact.key docker/proof-fri-gpu-compressor-gar | ||
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/proof-fri-gpu-compressor-gar | ||
- name: Login to us-central1 GAR | ||
run: | | ||
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | ||
|
||
- name: Login to Asia GAR | ||
run: | | ||
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://asia-docker.pkg.dev | ||
- name: Login to Europe GAR | ||
run: | | ||
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://europe-docker.pkg.dev | ||
- name: Build and push proof-fri-gpu-compressor-gar | ||
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 | ||
with: | ||
context: docker/proof-fri-gpu-compressor-gar | ||
build-args: | | ||
PROOF_COMPRESSOR_IMAGE=${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} | ||
push: true | ||
tags: | | ||
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} | ||
- name: Build and push prover-gpu-fri-gar to Asia GAR | ||
run: | | ||
docker buildx imagetools create \ | ||
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \ | ||
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} | ||
- name: Build and push prover-gpu-fri-gar to Europe GAR | ||
run: | | ||
docker buildx imagetools create \ | ||
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \ | ||
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ARG PROOF_COMPRESSOR_IMAGE | ||
FROM us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor:2.0-$PROOF_COMPRESSOR_IMAGE as proof_fri_gpu | ||
FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 as app | ||
|
||
# HACK copying to root is the only way to make Docker layer caching work for these files for some reason | ||
COPY *.bin / | ||
COPY ./setup_fflonk_compact.key /setup_fflonk_compact.key | ||
|
||
RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# copy finalization hints required for assembly generation | ||
COPY --from=proof_fri_gpu /setup_2\^24.key /setup_2\^24.key | ||
COPY --from=proof_fri_gpu /prover/data/keys/ /prover/data/keys/ | ||
COPY --from=proof_fri_gpu /usr/bin/zksync_proof_fri_compressor /usr/bin/ | ||
|
||
ENV CRS_FILE=/setup_2\^24.key | ||
ENV COMPACT_CRS_FILE=/setup_fflonk_compact.key | ||
|
||
|
||
ENTRYPOINT ["zksync_proof_fri_compressor"] |