-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_spp_O1
94 lines (84 loc) · 2.48 KB
/
Dockerfile_spp_O1
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM spp-llvm-clang-test:latest
ARG DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get -qq install -y \
autoconf \
automake \
pkg-config \
libndctl-dev \
libdaxctl-dev \
libglib2.0-dev \
libncurses5-dev \
libfuse-dev \
libuv1-dev \
pandoc \
libfabric-dev \
gdb \
python3.9 \
binutils-dev \
m4 \
bash \
valgrind \
# Dependencies to compile PMDK
git \
build-essential \
# Install dependencies for memkind
libnuma-dev \
libtool \
numactl \
unzip \
# Install dependencies for libpmemobj-cpp
cmake \
# Install dependencies for pmemkv
libtbb-dev
# setup env variables --- to be moved to image create
ENV CC:=/llvm/bin/clang
ENV CXX:=/llvm/bin/clang++
ENV NM:=/llvm/bin/llvm-nm
ENV AR:=/llvm/bin/llvm-ar
ENV RANLIB:=/llvm/bin/llvm-ranlib
ENV CMAKE_C_COMPILER:=/llvm/bin/clang
ENV CMAKE_CXX_COMPILER:=/llvm/bin/clang++
# compile runtime lib
WORKDIR /SPP/runtime
RUN make
# build pmdk
WORKDIR /SPP/pmdk
COPY ./pmdk_spp.patch_O1 /SPP/pmdk/pmdk_spp.patch_O1
RUN git apply pmdk_spp.patch_O1
RUN make -j$(nproc)
RUN make install -j$(nproc)
# build libpmemobj-cpp
WORKDIR /
RUN git clone https://github.com/pmem/libpmemobj-cpp.git /libpmemobj-cpp
WORKDIR /libpmemobj-cpp
RUN git checkout stable-1.13
COPY ./libpmemobj-cpp_spp.patch_O1 /libpmemobj-cpp/libpmemobj-cpp_spp.patch_O1
RUN git apply libpmemobj-cpp_spp.patch_O1
RUN mkdir build
WORKDIR /libpmemobj-cpp/build
RUN cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DBUILD_BENCHMARKS=OFF
RUN make -j$(nproc)
RUN make install -j$(nproc)
# build pmemkv
WORKDIR /
RUN git clone https://github.com/pmem/pmemkv.git /pmemkv
WORKDIR /pmemkv
RUN git checkout 1.4
COPY ./toolchain.cmake /pmemkv/toolchain.cmake
COPY ./pmemkv_spp.patch_O1 /pmemkv/pmemkv_spp.patch_O1
RUN git apply pmemkv_spp.patch_O1
RUN mkdir build
WORKDIR /pmemkv/build
RUN cmake .. -DCMAKE_BUILD_TYPE=Debug -DENGINE_CMAP=ON -DENGINE_VCMAP=OFF -DENGINE_VSMAP=OFF -DENGINE_STREE=OFF -DBUILD_JSON_CONFIG=OFF -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake
RUN make -j$(nproc)
RUN make install -j$(nproc)
# build pmemkv-bench
WORKDIR /
RUN git clone https://github.com/pmem/pmemkv-bench.git /pmemkv-bench
WORKDIR /pmemkv-bench
RUN git checkout 32d94c0
COPY pmemkv-bench_spp.patch_O1 /pmemkv-bench/pmemkv-bench_spp.patch_O1
RUN git apply pmemkv-bench_spp.patch_O1
RUN make -j$(nproc)
WORKDIR /