-
Notifications
You must be signed in to change notification settings - Fork 76
/
Dockerfile
56 lines (43 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ciimage/python:3.9 as base_image
COPY install_deps.sh /app/
RUN /app/install_deps.sh
# Install Cairo0 for end-to-end test.
RUN pip install cairo-lang==0.13.2
COPY docker_common_deps.sh /app/
WORKDIR /app/
RUN ./docker_common_deps.sh
RUN chown -R starkware:starkware /app
COPY WORKSPACE /app/
COPY .bazelrc /app/
COPY src /app/src
COPY e2e_test /app/e2e_test
COPY bazel_utils /app/bazel_utils
# Build.
RUN bazel build //...
FROM base_image
# Run tests.
RUN bazel test //...
# Copy cpu_air_prover and cpu_air_verifier.
RUN ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /bin/cpu_air_prover
RUN ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /bin/cpu_air_verifier
# End to end test.
WORKDIR /app/e2e_test/CairoZero
RUN cairo-compile fibonacci.cairo --output fibonacci_compiled.json --proof_mode
RUN cairo-run \
--program=fibonacci_compiled.json \
--layout=small \
--program_input=fibonacci_input.json \
--air_public_input=fibonacci_public_input.json \
--air_private_input=fibonacci_private_input.json \
--trace_file=fibonacci_trace.json \
--memory_file=fibonacci_memory.json \
--min_steps=512 \
--print_output \
--proof_mode
RUN cpu_air_prover \
--out_file=fibonacci_proof.json \
--private_input_file=fibonacci_private_input.json \
--public_input_file=fibonacci_public_input.json \
--prover_config_file=cpu_air_prover_config.json \
--parameter_file=cpu_air_params.json
RUN cpu_air_verifier --in_file=fibonacci_proof.json && echo "Successfully verified example proof."