From 08016b8aa2ae28d148d6c284e5e8b5c427d2820d Mon Sep 17 00:00:00 2001
From: Julien Girard <julien.girard2@cea.fr>
Date: Wed, 5 Jul 2023 17:12:44 +0200
Subject: [PATCH] [docker] Working docker with abcrown

---
 docker/Dockerfile.template | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/docker/Dockerfile.template b/docker/Dockerfile.template
index c4f046d..9ec6a35 100644
--- a/docker/Dockerfile.template
+++ b/docker/Dockerfile.template
@@ -43,9 +43,9 @@ ENV PATH "/home/opam/.local/bin:$PATH"
 
 # Python Conda
 
-ENV SHACONDA "1564571a6a06a9999a75a6c65d63cb82911fc647e96ba5b729f904bf00c177d3"
+ENV SHACONDA "aef279d6baea7f67940f16aad17ebe5f6aac97487c7c03466ff01f4819e5a651"
 
-RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_23.3.1-0-Linux-x86_64.sh -O ~/miniconda.sh
+RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Linux-x86_64.sh -O ~/miniconda.sh
 
 RUN SHAFILE=$(sha256sum ~/miniconda.sh | awk '{print $1}') && if [ "$SHAFILE" != "$SHACONDA" ]; then echo "Mismatch between SHA256SUM of downloaded script and expected script, aborting installation."; echo "The expected SHA256SUM is $SHACONDA, but the SHA256SUM of downloaded script is $SHAFILE."; exit 1; fi
 
@@ -113,6 +113,25 @@ pip3 install -r requirements.txt
 
 ENV PYTHONPATH "$PYTHONPATH:/home/opam/nnenum/src"
 
+## ABCrown
+
+RUN git clone https://github.com/Verified-Intelligence/alpha-beta-CROWN.git && \
+git -C alpha-beta-CROWN checkout 7b3d507caf40a5f42d99f6894373526c6fd615b7
+
+### From
+# https://github.com/Verified-Intelligence/alpha-beta-CROWN/blob/main/vnncomp_scripts/install_tool_general.sh,
+# and removing dependencies that are already in PyRAT
+# dependency set: pytorch, torchvision, torchaudio, tqdm,
+# pandas
+# DNNV and onnx2pytorch set on a specific commit
+# WARNING: Result in Pillow version and networkx version
+# different than what is expected by PyRAT and/or nnenum!
+
+RUN cd alpha-beta-CROWN && \
+conda install --yes cudatoolkit=11.1 mkl=2020.0 pyyaml packaging appdirs protobuf sortedcontainers -c pytorch-lts -c nvidia -c gurobi && \
+pip install --no-input --no-cache-dir onnx onnxruntime git+https://github.com/KaidiXu/onnx2pytorch.git@fe7281b9b6c8c28f61e72b8f3b0e3181067c7399 git+https://github.com/dlshriver/DNNV.git@6ab81fff8b83e5e7d5d964e409d092190368c8f1
+
+ENV PYTHONPATH "$PYTHONPATH:/home/opam/alpha-beta-CROWN/complete_verifier"
 
 # CAISAR
 
-- 
GitLab