Skip to content

Instantly share code, notes, and snippets.

@rnbguy
Last active December 23, 2020 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnbguy/e90164c60c5d5b339c69c9da3d0714a3 to your computer and use it in GitHub Desktop.
Save rnbguy/e90164c60c5d5b339c69c9da3d0714a3 to your computer and use it in GitHub Desktop.
ERAN on Arch (ETH Robustness Analyzer for Neural Networks)
#!/bin/bash
set -e
git clone --depth 1 https://github.com/eth-sri/ERAN.git
cd ERAN
git clone https://github.com/eth-sri/ELINA.git
cd ELINA
grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
./configure -use-deeppoly -use-gurobi -use-fconv --cdd-prefix /usr/include/cddlib
make
make install
cd ..
git clone https://github.com/eth-sri/deepg.git
cd deepg/code
grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
mkdir build
make shared_object
install ./build/libgeometric.so /usr/lib
cd ../..
FROM archlinux:base-devel
RUN pacman -Syu --noconfirm
# RUN pacman -S --noconfirm m4 gmp mpfr
RUN pacman -S --noconfirm git cddlib tensorflow-opt
RUN useradd -m notroot
RUN echo "notroot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/notroot
USER notroot
WORKDIR /home/notroot
RUN git clone https://aur.archlinux.org/gurobi.git && cd gurobi && \
makepkg --noconfirm --syncdeps --rmdeps --install --clean
USER root
WORKDIR /home/root
ADD ./arch-install.sh ./arch-install.sh
RUN sh ./arch-install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment