-
Notifications
You must be signed in to change notification settings - Fork 23
/
DockerfilePBE
59 lines (47 loc) · 1.99 KB
/
DockerfilePBE
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
53
54
55
56
57
58
59
# Dockerfile to build PBE
# builds using simcenter-common
# written: fmk 08/23
FROM simcenter-common
SHELL ["/bin/bash", "-c"]
WORKDIR /simcenter
#
# Build the PBE frontend, need quazip & updated dmake first
#
RUN source /opt/qt515/bin/qt515-env.sh \
&& sudo apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget \
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - \
&& sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& sudo apt-get install -y cmake zlib1g-dev \
&& git clone -b v1.4 --single-branch https://github.com/stachenov/quazip.git \
&& cd quazip \
&& mkdir build; cd build; cmake ..; make; make install \
& cd ../.. \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/SimCenterCommon.git \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/QS3hark.git \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/EE-UQ.git \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/PBE.git \
&& cd PBE \
&& mkdir build \
&& cd build \
&& qmake "QMAKE_CXXFLAGS+=-D_SC_RELEASE" ../PBE.pro \
&& make -j 4 \
&& rm -fr .obj *.o *.cpp\
&& cd ../..
#
# Copy all files into correct locations for running & clean up
#
RUN cd PBE/build \
&& cp -r ../Examples ./ \
&& cp -r ../../SimCenterBackendApplications/applications . \
&& rm -fr /simcenter/SimCenterBackendApplications \
&& rm -fr /simcenter/SimCenterCommon
#
# add following for the missing lib libQt5Core.so error that is related to running on some versions linux
# with an older kernel, seemingly need kernel >= 3.5 on host .. soln from Sal T. found in an AskUbuntu thread
#
RUN strip --remove-section=.note.ABI-tag /opt/qt515/lib/libQt5Core.so.5
#
# Finally add a new user simcenter as root cannot run the Qt app
#
RUN useradd -ms /bin/bash simcenter
USER simcenter