-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
35 lines (30 loc) · 1.06 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
FROM flatironinstitute/triqs:3.3.0 as base
LABEL maintainer="Igor Krivenko <[email protected]>"
LABEL description="Stochastic Optimization Method for Analytic Continuation"
ARG APPNAME=som
USER root
RUN useradd -m -s /bin/bash -u 999 build && echo "build:build" | chpasswd
RUN apt-get update && \
apt-get install -y --no-install-recommends make g++-12 apt-utils file
RUN sh -c 'echo -e "\nrmaps_base_oversubscribe = 1" >> \
/etc/openmpi/openmpi-mca-params.conf'
COPY requirements.txt /src/$APPNAME/requirements.txt
RUN pip3 install -r /src/$APPNAME/requirements.txt
COPY --chown=build . $SRC/$APPNAME
WORKDIR $BUILD/$APPNAME
RUN chown build .
USER build
ENV CC gcc-12
ENV CXX g++-12
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBuild_Documentation=OFF \
-DBUILD_DEBIAN_PACKAGE=ON \
&& make -j4 || make -j1 VERBOSE=1 \
&& ctest --output-on-failure \
&& cpack
USER root
RUN make install \
&& mkdir -p /build/repo \
&& mv som-*.deb /build/repo