Skip to content

Instantly share code, notes, and snippets.

@rnbguy
Last active December 23, 2020 09:38
Show Gist options
  • Save rnbguy/e90164c60c5d5b339c69c9da3d0714a3 to your computer and use it in GitHub Desktop.
Save rnbguy/e90164c60c5d5b339c69c9da3d0714a3 to your computer and use it in GitHub Desktop.

Revisions

  1. rnbguy revised this gist Dec 23, 2020. 2 changed files with 2 additions and 4 deletions.
    3 changes: 1 addition & 2 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ FROM archlinux:base-devel

    RUN pacman -Syu --noconfirm
    # RUN pacman -S --noconfirm m4 gmp mpfr
    RUN pacman -S --noconfirm git python-pip cddlib tensorflow-opt
    RUN pacman -S --noconfirm git cddlib tensorflow-opt

    RUN useradd -m notroot
    RUN echo "notroot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/notroot
    @@ -13,6 +13,5 @@ RUN git clone https://aur.archlinux.org/gurobi.git && cd gurobi && \

    USER root
    WORKDIR /home/root
    ADD ./gurobi.lic /opt/gurobi/
    ADD ./arch-install.sh ./arch-install.sh
    RUN sh ./arch-install.sh
    3 changes: 1 addition & 2 deletions arch-install.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,6 @@ cd ERAN
    git clone https://github.com/eth-sri/ELINA.git
    cd ELINA
    grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
    sed -i 's|/usr/local/include/cddlib|$(CDD_PREFIX)|' fppoly/Makefile
    ./configure -use-deeppoly -use-gurobi -use-fconv --cdd-prefix /usr/include/cddlib
    make
    make install
    @@ -19,5 +18,5 @@ cd deepg/code
    grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
    mkdir build
    make shared_object
    cp ./build/libgeometric.so /usr/lib
    install ./build/libgeometric.so /usr/lib
    cd ../..
  2. rnbguy revised this gist Dec 22, 2020. 2 changed files with 14 additions and 12 deletions.
    5 changes: 3 additions & 2 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ FROM archlinux:base-devel

    RUN pacman -Syu --noconfirm
    # RUN pacman -S --noconfirm m4 gmp mpfr
    RUN pacman -S --noconfirm git python-pip cddlib
    RUN pacman -S --noconfirm git python-pip cddlib tensorflow-opt

    RUN useradd -m notroot
    RUN echo "notroot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/notroot
    @@ -13,5 +13,6 @@ RUN git clone https://aur.archlinux.org/gurobi.git && cd gurobi && \

    USER root
    WORKDIR /home/root
    ADD ./gurobi.lic /opt/gurobi/
    ADD ./arch-install.sh ./arch-install.sh
    RUN sh ./arch-install.sh
    RUN sh ./arch-install.sh
    21 changes: 11 additions & 10 deletions arch-install.sh
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,23 @@
    #!/bin/bash

    set -e

    git clone --depth 1 https://github.com/eth-sri/ERAN.git
    cd ERAN

    git clone --depth 1 https://github.com/eth-sri/deepg.git
    cd deepg/code
    grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
    mkdir build
    make shared_object
    cp ./build/libgeometric.so /usr/lib
    cd ../..

    git clone --depth 1 https://github.com/eth-sri/ELINA.git
    git clone https://github.com/eth-sri/ELINA.git
    cd ELINA
    grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
    sed -i 's|/usr/local/include/cddlib|$(CDD_PREFIX)|' fppoly/Makefile
    ./configure -use-deeppoly -use-gurobi -use-fconv --cdd-prefix /usr/include/cddlib
    make
    make install
    cd ..

    pip3 install -r requirements.txt
    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
    cp ./build/libgeometric.so /usr/lib
    cd ../..
  3. rnbguy created this gist Dec 15, 2020.
    17 changes: 17 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    FROM archlinux:base-devel

    RUN pacman -Syu --noconfirm
    # RUN pacman -S --noconfirm m4 gmp mpfr
    RUN pacman -S --noconfirm git python-pip cddlib

    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
    22 changes: 22 additions & 0 deletions arch-install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    set -e

    git clone --depth 1 https://github.com/eth-sri/ERAN.git
    cd ERAN

    git clone --depth 1 https://github.com/eth-sri/deepg.git
    cd deepg/code
    grep -inlr 'gurobi90' . | xargs sed -i 's/gurobi90/gurobi91/'
    mkdir build
    make shared_object
    cp ./build/libgeometric.so /usr/lib
    cd ../..

    git clone --depth 1 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 ..

    pip3 install -r requirements.txt