-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e865e0d
commit 50af7e5
Showing
10 changed files
with
445 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
name: Docker images for ghcr.io | ||
runs-on: ubuntu-latest | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
DOCKER_REGISTRY: ghcr.io | ||
DOCKER_IMAGE_BASE: ${{ github.repository }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.DOCKER_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Prover and Verifier | ||
|
||
- name: Prover&Verifier image tags & labels | ||
id: meta-all | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }} | ||
- name: Prover&Verifier image build & push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: ${{ steps.meta-all.outputs.tags }} | ||
labels: ${{ steps.meta-all.coutputs.labels }} | ||
|
||
|
||
# Prover | ||
|
||
- name: Prover image tags & labels | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-prover | ||
- name: Prover image build & push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
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 }} |
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,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_prover"] |
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,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/bazel-bin/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_prover"] |
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,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"] |
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,17 @@ | ||
{ | ||
"field": "PrimeField0", | ||
"stark": { | ||
"fri": { | ||
"fri_step_list": [ | ||
0, | ||
4, | ||
3 | ||
], | ||
"last_layer_degree_bound": 64, | ||
"n_queries": 18, | ||
"proof_of_work_bits": 24 | ||
}, | ||
"log_n_cosets": 4 | ||
}, | ||
"use_extension_field": false | ||
} |
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,9 @@ | ||
{ | ||
"cached_lde_config": { | ||
"store_full_lde": false, | ||
"use_fft_for_eval": false | ||
}, | ||
"constraint_polynomial_task_size": 256, | ||
"n_out_of_memory_merkle_layers": 1, | ||
"table_prover_n_tasks_per_segment": 32 | ||
} |
Binary file not shown.
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,7 @@ | ||
{ | ||
"trace_path": "/home/zaariel/stone-prover/test_files/fibonacci_trace.json", | ||
"memory_path": "/home/zaariel/stone-prover/test_files/fibonacci_memory.json", | ||
"pedersen": [], | ||
"range_check": [], | ||
"ecdsa": [] | ||
} |
Oops, something went wrong.