-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(raiko): make raiko-zk docker image (#374)
* update sp1 to 2.0.0 Signed-off-by: smtmfft <smtm@taiko.xyz> * feat(raiko): zk docker image build Signed-off-by: smtmfft <smtm@taiko.xyz> * add dockerfile Signed-off-by: smtmfft <smtm@taiko.xyz> * let dockerfile.zk print vk/image_id Signed-off-by: smtmfft <smtm@taiko.xyz> * update docker compose file Signed-off-by: smtmfft <smtm@taiko.xyz> * fmt build.sh Signed-off-by: smtmfft <smtm@taiko.xyz> * docker build sgx only Signed-off-by: smtmfft <smtm@taiko.xyz> * remove dockerfile reportvk/ iage_id Signed-off-by: smtmfft <smtm@taiko.xyz> * print vk/image_id after build Signed-off-by: smtmfft <smtm@taiko.xyz> --------- Signed-off-by: smtmfft <smtm@taiko.xyz>
- Loading branch information
Showing
14 changed files
with
303 additions
and
152 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 |
---|---|---|
|
@@ -20,3 +20,5 @@ | |
!/kzg_settings_raw.bin | ||
!/core | ||
!/tasks | ||
!/makefile | ||
!/script |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,58 @@ | ||
FROM rust:1.79.0 as builder | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ARG BUILD_FLAGS="" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
cracklib-runtime \ | ||
jq \ | ||
clang \ | ||
sudo && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /opt/raiko | ||
# build related files | ||
COPY Cargo.lock Cargo.lock | ||
COPY Cargo.toml Cargo.toml | ||
COPY lib lib | ||
COPY provers provers | ||
COPY host host | ||
COPY pipeline pipeline | ||
COPY harness harness | ||
COPY rust-toolchain rust-toolchain | ||
COPY kzg_settings_raw.bin kzg_settings_raw.bin | ||
COPY core core | ||
COPY tasks tasks | ||
COPY makefile makefile | ||
COPY script script | ||
RUN ls -al > /tmp/file_list.txt | ||
RUN cat /tmp/file_list.txt | ||
|
||
ENV TARGET=risc0 | ||
RUN mkdir -p ~/.cargo/bin | ||
RUN echo "Building for risc0" | ||
RUN make install | ||
RUN make guest | ||
RUN echo "Building for sp1" | ||
ENV TARGET=sp1 | ||
RUN make install | ||
RUN make guest | ||
RUN cargo build --release ${BUILD_FLAGS} --features "sp1,risc0,bonsai-auto-scaling" --features "docker_build" | ||
|
||
RUN mkdir -p \ | ||
./bin \ | ||
/etc/raiko \ | ||
/var/log/raiko \ | ||
/tmp/risc0-cache | ||
|
||
# copy to /etc/raiko, but if self register mode, the mounted one will overwrite it. | ||
RUN cp /opt/raiko/host/config/config.sgx.json /etc/raiko/ | ||
RUN cp /opt/raiko/host/config/chain_spec_list_default.json /etc/raiko/chain_spec_list.docker.json | ||
RUN cp /opt/raiko/target/release/raiko-host ./bin/ | ||
|
||
WORKDIR /opt/raiko/bin | ||
COPY ./docker/entrypoint.sh /opt/raiko/bin/ | ||
ENTRYPOINT [ "/opt/raiko/bin/entrypoint.sh" ] |
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
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
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
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
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
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
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
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
Binary file not shown.
Oops, something went wrong.