-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.openblas
86 lines (80 loc) · 3.14 KB
/
Dockerfile.openblas
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
# Install the necessary tools to build the binaries from source
FROM __IMAGE_ARCH__/debian:stretch-slim AS binaries
__CROSS_COPY__ qemu-__QEMU_ARCH__-static /usr/bin
RUN apt-get update
RUN apt-get install --yes make g++ gfortran git unzip wget libuv1-dev \
librhash-dev zlib1g-dev libcurl4-openssl-dev \
libexpat1-dev libarchive-dev libjsoncpp-dev
# Build and install CMake from source
RUN wget -O cmake.zip https://gitlab.kitware.com/cmake/cmake/-/archive/v3.9.0/cmake-v3.9.0.zip
RUN unzip cmake.zip -d /tmp/
WORKDIR /tmp/cmake-v3.9.0
RUN ./configure --system-libs --no-qt-gui
RUN make
RUN make install
# Build and install 0MQ from source
RUN git clone https://github.com/zeromq/libzmq /tmp/libzmq
WORKDIR /tmp/libzmq
RUN git checkout -b install v4.3.2
RUN mkdir build
WORKDIR /tmp/libzmq/build
RUN cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=Release \
-D ENABLE_DRAFTS=OFF \
-D ENABLE_CURVE=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_SHARED=ON \
-D BUILD_STATIC=ON \
-D WITH_OPENPGM=OFF \
-D WITH_DOC=OFF \
-D LIBZMQ_WERROR=OFF \
-D LIBZMQ_PEDANTIC=OFF \
../
RUN cmake --build .
RUN cmake --build . --target install
# Build and install OpenBLAS from source
RUN git clone https://github.com/xianyi/OpenBLAS /tmp/openblas
WORKDIR /tmp/openblas
RUN git checkout -b install v0.3.6
RUN mkdir build
WORKDIR /tmp/openblas/build
RUN cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_WITHOUT_LAPACK=OFF \
-D BUILD_WITHOUT_CBLAS=ON \
-D DYNAMIC_ARCH=ON \
../
RUN cmake --build .
RUN cmake --build . --target install
# Install cereal from source
RUN git clone https://github.com/USCiLab/cereal /tmp/cereal
WORKDIR /tmp/cereal
RUN git checkout -b install v1.2.2
RUN mkdir build
WORKDIR /tmp/cereal/build
RUN cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D JUST_INSTALL_CEREAL=ON \
../
RUN cmake --build .
RUN cmake --build . --target install
# Install GTest from source
RUN git clone https://github.com/google/googletest /tmp/gtest
WORKDIR /tmp/gtest
RUN git checkout -b install release-1.10.0
RUN mkdir build
WORKDIR /tmp/gtest/build
RUN cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
../
RUN cmake --build .
RUN cmake --build . --target install
# Assemble all the built and installed libraries together
FROM __IMAGE_ARCH__/debian:stretch-slim AS final
COPY --from=binaries /usr/local /usr/local
__CROSS_COPY__ qemu-__QEMU_ARCH__-static /usr/bin
RUN apt-get update
RUN apt-get install --yes make g++ gfortran git unzip wget libuv1-dev \
librhash-dev zlib1g-dev libcurl4-openssl-dev \
libexpat1-dev libarchive-dev libjsoncpp-dev