-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
31 lines (24 loc) · 856 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
FROM debian:stable-slim AS compile-image
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
build-essential gcc gfortran cmake \
libboost-all-dev \
libyaml-cpp-dev \
liblapacke-dev
WORKDIR /app-build
COPY . ./
ENV LDFLAGS=-L/usr/lib/x86_64-linux-gnu
RUN cmake -S . -B build -DCMAKE_PREFIX_PATH=/opt/qutree -DCMAKE_INSTALL_PREFIX=/opt/qutree
RUN cmake --build build -j$(nproc) --target QuTree Hamiltonians mctdh
RUN cmake --install build
RUN cmake --install build/contrib
FROM debian:stable-slim AS build-image
COPY --from=compile-image /opt/qutree /opt/qutree
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libyaml-cpp-dev \
liblapacke-dev && \
apt-get clean && apt-get autoremove
ENV PATH="/opt/qutree/bin:$PATH"
ENV LD_LIBRARY_PATH="/opt/qutree/lib:$LD_LIBRARY_PATH"
WORKDIR /app