diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2020-01-23 15:37:26 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-02-13 17:39:21 +0000 |
commit | 56736fa30e8ea72b3ac63d087f7cfcdfcd3a784f (patch) | |
tree | adbf450cf97376c7d822077305523090d45776f4 /scripts | |
parent | 426f501aed1125b048daefb8b3ccfecaea201d45 (diff) | |
download | klee-56736fa30e8ea72b3ac63d087f7cfcdfcd3a784f.tar.gz |
Update Docker image template for KLEE.
* Port changes from .Dockerfile to this * install emacs-nox and vim-nox instead of pulling all X dependencies * Clean apt cache
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/d-klee-linux-ubuntu.inc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/build/d-klee-linux-ubuntu.inc b/scripts/build/d-klee-linux-ubuntu.inc index 5d03a7e5..fc783cb2 100644 --- a/scripts/build/d-klee-linux-ubuntu.inc +++ b/scripts/build/d-klee-linux-ubuntu.inc @@ -1,24 +1,29 @@ # TODO remove adding sudo package # Create ``klee`` user for container with password ``klee``. # and give it password-less sudo access (temporarily so we can use the TravisCI scripts) -RUN apt update && apt -y --no-install-recommends install sudo file && \ +RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo emacs-nox vim-nox file python3-dateutil && \ rm -rf /var/lib/apt/lists/* && \ useradd -m klee && \ echo klee:klee | chpasswd && \ cp /etc/sudoers /etc/sudoers.bak && \ echo 'klee ALL=(root) NOPASSWD: ALL' >> /etc/sudoers -ENV BASE=/tmp # Copy across source files needed for build -# Set klee user to be owner -ADD --chown=klee:klee / ${BASE}/klee_src +COPY --chown=klee:klee . /tmp/klee_src/ + +# Build and set klee user to be owner +RUN /tmp/klee_src/scripts/build/build.sh --debug --install-system-deps klee && chown -R klee:klee /tmp/klee_build* && pip3 install flask wllvm && \ + rm -rf /var/lib/apt/lists/* + +ENV PATH="$PATH:/tmp/llvm-60-install_O_D_A/bin:/home/klee/klee_build/bin" +ENV BASE=/tmp USER klee WORKDIR /home/klee ENV LD_LIBRARY_PATH /home/klee/klee_build/lib/ # Add KLEE binary directory to PATH -RUN /bin/bash -c 'ln -s ${BASE}/klee_src /home/klee/ && ln -s ${BASE}/klee_build* /home/klee/klee_build && echo "export PATH=\"$PATH:$(cd /tmp/llvm-*install*/bin && pwd):/home/klee/klee_build/bin\"" >> /home/klee/.bashrc' +RUN /bin/bash -c 'ln -s ${BASE}/klee_src /home/klee/ && ln -s ${BASE}/klee_build* /home/klee/klee_build' # TODO Remove when STP is fixed RUN /bin/bash -c 'echo "export LD_LIBRARY_PATH=$(cd ${BASE}/metaSMT-*-deps/stp-git-basic/lib/ && pwd):$LD_LIBRARY_PATH" >> /home/klee/.bashrc' |