-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
52 lines (40 loc) · 1.6 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Pull base image.
FROM ubuntu:18.04
ARG port=3000
EXPOSE ${port}
# install locales
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
# Set the locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# install z3
RUN apt-get install -y git build-essential python
RUN cd /home; git clone https://github.com/Z3Prover/z3.git
RUN cd /home/z3; git checkout z3-4.8.1; python scripts/mk_make.py; cd build; make; make install
# install haskell stack tool
RUN apt-get install -y libtinfo-dev zlib1g-dev haskell-stack
RUN stack upgrade
ENV PATH="/root/.local/bin:${PATH}"
# Get tools for the evaluation
RUN apt-get install -y python3 python3-pip
RUN pip3 install --user PyYAML numpy tabulate matplotlib argparse
# Get HooglePlus
RUN cd /home; git clone https://github.com/davidmrdavid/hoogle_plus.git
RUN cd /home/hoogle_plus && git checkout origin/master
RUN cd /home/hoogle_plus && stack build
# Start with bash
RUN cd /home/hoogle_plus && stack exec -- hplus generate --preset=partialfunctions
RUN mkdir -p /var/log/hplus
CMD cd /home/hoogle_plus && stack run webapp -p ${port} >> /var/log/hplus/run.log
HEALTHCHECK CMD curl --fail http://localhost:${port}/ || exit 1
# To start the image, please mount the source file directory to /home/hoogle_plus
# docker run -v PATH_TO_HOOGLE_PLUS_SOURCE:/home/hoogle_plus -it hoogle_plus
# After the docker image is started
# run `cd /home/hoogle_plus; stack build`
#
# REMEMBER TO TAG CHANGES WITH LATEST.
# LATEST TAG IS NOT UPDATED AUTOMATICALLY
#