forked from Xiangyu-Hu/SPHinXsys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (28 loc) · 902 Bytes
/
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
FROM ubuntu:20.04
ARG build_with_dependencies_source=0
ARG SPH_ONLY_STATIC_BUILD=0
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y \
apt-utils \
build-essential \
cmake \
libgtest-dev \
libtbb-dev \
libboost-all-dev \
libsimbody-dev \
libsimbody3.6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV TBB_HOME=/usr/lib/x86_64-linux-gnu
ENV BOOST_HOME=/usr/lib/x86_64-linux-gnu
ENV SIMBODY_HOME=/usr
COPY ./ /home/SPHinXsys/
WORKDIR /home/SPHinXsys
RUN cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
cd /home/SPHinXsys
RUN git submodule update --init
RUN rm -rf build
RUN mkdir build && cd build && cmake .. -DBUILD_WITH_DEPENDENCIES_SOURCE=${build_with_dependencies_source} -DSTATIC_BUILD=${SPH_ONLY_STATIC_BUILD} && make -j$(nproc)