From 32889be93d75d8be99d682531c16e2df968039df Mon Sep 17 00:00:00 2001 From: Artem Fomiuk <88630083+Artemka374@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:31:03 +0300 Subject: [PATCH] fix: Docker build for compressor (#2874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Pass CUDA_ARCH to compressor image build. ## Why ❔ ## Checklist - [ ] 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. - [ ] Code has been formatted via `zk fmt` and `zk lint`. --- infrastructure/zk/src/docker.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infrastructure/zk/src/docker.ts b/infrastructure/zk/src/docker.ts index 27de68d1d98d..a100d1231da6 100644 --- a/infrastructure/zk/src/docker.ts +++ b/infrastructure/zk/src/docker.ts @@ -1,4 +1,4 @@ -import { Command } from 'commander'; +import {Command} from 'commander'; import * as utils from 'utils'; const IMAGES = [ @@ -31,7 +31,7 @@ async function dockerCommand( dockerOrg: string = 'matterlabs' ) { // Generating all tags for containers. We need 2 tags here: SHA and SHA+TS - const { stdout: COMMIT_SHORT_SHA }: { stdout: string } = await utils.exec('git rev-parse --short HEAD'); + const {stdout: COMMIT_SHORT_SHA}: { stdout: string } = await utils.exec('git rev-parse --short HEAD'); // COMMIT_SHORT_SHA returns with newline, so we need to trim it const imageTagShaTS: string = process.env.IMAGE_TAG_SUFFIX ? process.env.IMAGE_TAG_SUFFIX @@ -114,7 +114,7 @@ async function _build(image: string, tagList: string[], dockerOrg: string, platf if (platform != '') { buildArgs += `--platform=${platform} `; } - if (image === 'prover-gpu-fri') { + if (image === 'prover-gpu-fri' || image == 'proof-fri-gpu-compressor') { const cudaArch = process.env.CUDA_ARCH; buildArgs += `--build-arg CUDA_ARCH='${cudaArch}' `; } @@ -126,6 +126,8 @@ async function _build(image: string, tagList: string[], dockerOrg: string, platf } buildArgs += extraArgs; + console.log("Build args: ", buildArgs); + const buildCommand = `DOCKER_BUILDKIT=1 docker buildx build ${tagsToBuild}` + (buildArgs ? ` ${buildArgs}` : '') +