-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
50 lines (45 loc) · 1.16 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
FROM ubuntu:20.04
CMD bash
ENV DEBIAN_FRONTEND noninteractive
# Set up virtual environment
ENV VIRTUAL_ENV=/venv
# Set the environment variable DELPHI_DB to point to the SQLite3 database.
ENV DELPHI_DB=/delphi/data/delphi.db
ENV MODEL_FILES=/delphi/data/source_model_files
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
ca-certificates \
build-essential \
libboost-all-dev \
pkg-config \
cmake \
curl \
git \
tar \
wget \
doxygen \
graphviz \
libgraphviz-dev \
libsqlite3-dev \
libeigen3-dev \
libfmt-dev \
librange-v3-dev \
nlohmann-json3-dev
# build served from source
RUN curl -LO https://github.com/meltwater/served/archive/refs/tags/v1.6.0.tar.gz \
&& tar -xzf v1.6.0.tar.gz \
&& cd served-1.6.0 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make -j `nproc` install \
&& cd ..
COPY . /delphi
WORKDIR /delphi
# build delphi_rest_api
RUN mkdir -p data \
&& mkdir build \
&& cd build \
&& cmake .. -DBUILD_PYTHON_BINDINGS=OFF \
&& make -j `nproc` delphi_rest_api \
&& cd ..