Skip to content

Commit

Permalink
add verifier Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaariel91 committed Jul 5, 2024
1 parent dba9e97 commit df415c9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,32 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-prover
- name: Prover image build & push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
file: air_prover/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.coutputs.labels }}

# Verifier

- name: Verifier image tags & labels
id: meta-ver
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-verifier
- name: Verifier image build & push
uses: docker/build-push-action@v3
with:
context: .
file: air_verifier/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-ver.outputs.tags }}
labels: ${{ steps.meta-ver.coutputs.labels }}
File renamed without changes.
35 changes: 35 additions & 0 deletions air_verifier/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Stage 1: Base Image
FROM ciimage/python:3.9 AS base_image

# Install necessary dependencies including git
RUN apt-get update && apt-get install -y git

# Clone the public prover repository
RUN git clone https://github.com/starkware-libs/stone-prover.git /app/prover

# Set the working directory to the cloned repository
WORKDIR /app/prover

# Run the installation scripts from the cloned repository
RUN /app/prover/install_deps.sh
RUN ./docker_common_deps.sh

# Change ownership of the /app directory
RUN chown -R starkware:starkware /app

# Build the project using Bazel
RUN bazel build //...

# Stage 2: Target Image
FROM debian:stable-slim AS target

# Copy the built binary from the base image to the target image
#COPY --from=base_image /app/prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /usr/bin/
# Uncomment the following line if you need to copy the verifier as well
COPY --from=base_image /app/prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /usr/bin/

# Install the necessary runtime dependencies
RUN apt update && apt install -y libdw1

# Set the entry point for the container
ENTRYPOINT ["cpu_air_verifier"]

0 comments on commit df415c9

Please sign in to comment.