Skip to content

Commit

Permalink
fmk - adding DockerfileQUO, used with DockerfileCommon in SimCenterCo…
Browse files Browse the repository at this point in the history
…mmon repo
  • Loading branch information
fmckenna committed Sep 14, 2024
1 parent 8140916 commit dd77993
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions DockerfileQUO
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Dockerfile to build quoFEM
# installing: Qt5.15.2, OpenSees3.5.0, dakota6.15.0, python3.9.6
# written: fmk 08/23

FROM simcenter-common

SHELL ["/bin/bash", "-c"]

WORKDIR /simcenter

#
# Build the frontend
#

RUN source /opt/qt515/bin/qt515-env.sh \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/SimCenterCommon.git \
&& git clone --depth 1 --branch master https://github.com/NHERI-SimCenter/quoFEM.git \
&& cd quoFEM \
&& mkdir build \
&& cd build \
&& qmake "QMAKE_CXXFLAGS+=-D_SC_RELEASE" ../quoFEM.pro \
&& make \
&& rm -fr .obj \
&& cd ../..

#
# Copy all files into correct locations for running & clean up
#

RUN cd quoFEM/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

0 comments on commit dd77993

Please sign in to comment.