From 816effe5f8e5105b0bde3dc6453d7d9653086eb1 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Thu, 14 Dec 2023 14:11:33 +0000 Subject: [PATCH 1/2] fix: setup aztec-cli cache --- yarn-project/cli/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/cli/Dockerfile b/yarn-project/cli/Dockerfile index dc70ce119cad..96b7fd46cb8d 100644 --- a/yarn-project/cli/Dockerfile +++ b/yarn-project/cli/Dockerfile @@ -3,4 +3,8 @@ ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/cli/dest/bin/index.j # The version has been updated in yarn-project-prod. # Adding COMMIT_TAG here to rebuild versioned image. -ARG COMMIT_TAG="" \ No newline at end of file +ARG COMMIT_TAG="" + +ENV XDG_CACHE_HOME /cache +RUN mkdir /cache && chmod 777 /cache +VOLUME /cache From 3a8f99f9313944aebc8fdcefa6d66bd49d7af59a Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Thu, 14 Dec 2023 15:04:03 +0000 Subject: [PATCH 2/2] fix: mount cache volume --- yarn-project/cli/Dockerfile | 6 +----- yarn-project/cli/aztec-cli | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/yarn-project/cli/Dockerfile b/yarn-project/cli/Dockerfile index 96b7fd46cb8d..dc70ce119cad 100644 --- a/yarn-project/cli/Dockerfile +++ b/yarn-project/cli/Dockerfile @@ -3,8 +3,4 @@ ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/cli/dest/bin/index.j # The version has been updated in yarn-project-prod. # Adding COMMIT_TAG here to rebuild versioned image. -ARG COMMIT_TAG="" - -ENV XDG_CACHE_HOME /cache -RUN mkdir /cache && chmod 777 /cache -VOLUME /cache +ARG COMMIT_TAG="" \ No newline at end of file diff --git a/yarn-project/cli/aztec-cli b/yarn-project/cli/aztec-cli index 6a96c892d47d..9f4ec5f38505 100755 --- a/yarn-project/cli/aztec-cli +++ b/yarn-project/cli/aztec-cli @@ -148,7 +148,10 @@ if [[ ! -z "${DEBUG:-}" ]]; then DOCKER_ENV="$DOCKER_ENV -e DEBUG=$DEBUG" fi -DOCKER_VOLUME="$DOCKER_VOLUME -v cache:/cache" +COMPILER_CACHE="$HOME/.aztec/cache" +mkdir -p "$COMPILER_CACHE" +DOCKER_VOLUME="$DOCKER_VOLUME -v $COMPILER_CACHE:/cache" +DOCKER_ENV="$DOCKER_ENV -e XDG_CACHE_HOME=/cache" $DOCKER_PATH run \ --rm \