Skip to content

Instantly share code, notes, and snippets.

@Romern
Created August 12, 2021 10:02
Show Gist options
  • Save Romern/38e1df89c9332600c98279efaacf2583 to your computer and use it in GitHub Desktop.
Save Romern/38e1df89c9332600c98279efaacf2583 to your computer and use it in GitHub Desktop.
Dockerfile for verifiable-image-redacting
FROM rust:slim-buster
RUN apt-get update
RUN apt-get install -y \
wget unzip curl \
build-essential cmake git libgmp3-dev libprocps-dev python-markdown libboost-all-dev libssl-dev pkg-config libopencv-dev
# install verifiable image redacting library with workaround for now (see https://github.com/snp-labs/verifiable-image-redacting/issues/1 )
RUN git clone https://github.com/Romern/verifiable-image-redacting \
&& cd verifiable-image-redacting \
&& git checkout alpine \
&& git submodule init && git submodule update --recursive
# 3.4 not needed, 3.2 does the job
RUN sed -i "s/OpenCV 3\.4\.0/OpenCV 3\.2\.0/g" verifiable-image-redacting/libsnark/CMakeLists.txt
# build the tests
RUN cd verifiable-image-redacting \
&& mkdir build && cd build && cmake -DWITH_PROCPS=OFF -DMULTICORE=ON .. \
&& make zk_proof_systems_snark_for_filtering zk_proof_systems_snark_for_filtering_test \
&& make install
# copy testfiles into binary output folder for quick testing
RUN cp verifiable-image-redacting/libsnark/zk_proof_systems/ppzksnark/snark_for_filtering/tests/*.jpg verifiable-image-redacting/build/libsnark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment