Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bootstrap_cache.sh script to prime bb and noir ts packages. #3866

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion barretenberg/cpp/dockerfiles/Dockerfile.wasm-linux-clang
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ RUN ./scripts/strip-wasm.sh

FROM scratch
WORKDIR /usr/src/barretenberg/cpp
COPY . .
COPY --from=builder /usr/src/barretenberg/cpp/srs_db /usr/src/barretenberg/cpp/srs_db
COPY --from=builder /usr/src/barretenberg/cpp/build-wasm/bin/barretenberg.wasm /usr/src/barretenberg/cpp/build-wasm/bin/barretenberg.wasm
COPY --from=builder /usr/src/barretenberg/cpp/build-wasm-threads/bin/barretenberg.wasm /usr/src/barretenberg/cpp/build-wasm-threads/bin/barretenberg.wasm
8 changes: 8 additions & 0 deletions bootstrap_cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

cd "$(dirname "$0")"

source ./build-system/scripts/setup_env '' '' mainframe_$USER > /dev/null

extract_repo bb.js /usr/src/barretenberg/ts/dest ./barretenberg/ts
extract_repo noir-packages /usr/src/noir/packages ./noir
5 changes: 1 addition & 4 deletions build-system/scripts/extract_repo
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ IMAGE_COMMIT_URI=$(calculate_image_uri $REPOSITORY)
echo "Pulling $IMAGE_COMMIT_URI..."
ecr_login
retry docker pull $IMAGE_COMMIT_URI
TEMP_CONTAINER=$(docker create $IMAGE_COMMIT_URI)
TEMP_CONTAINER=$(docker create $IMAGE_COMMIT_URI dummy_cmd)

echo "Extracting $EXTRACT_FROM from $REPOSITORY to $EXTRACT_TO..."
mkdir -p $EXTRACT_TO
docker cp $TEMP_CONTAINER:$EXTRACT_FROM $EXTRACT_TO
docker rm -v $TEMP_CONTAINER >/dev/null

echo "Extracted contents:"
ls -al $EXTRACT_TO