-
Notifications
You must be signed in to change notification settings - Fork 0
/
alpine-gnu
45 lines (36 loc) · 2.31 KB
/
alpine-gnu
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
# vim: filetype=dockerfile:
FROM alpine:edge
# Install system-wide prerequisites
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && cat /etc/apk/repositories
RUN apk update && apk add libtool autoconf automake gfortran gcc g++ make boost-dev ccache wget bash m4 file git cmake perl grep zlib-dev libexecinfo-dev ninja libdwarf-dev libelf-dev binutils-dev patch
# Install OpenMPI with gnu
ADD http://download.open-mpi.org/release/open-mpi/v2.1/openmpi-2.1.5.tar.gz /openmpi/
RUN cd /openmpi/ && tar xzf openmpi-2.1.5.tar.gz
# Patch OpenMPI 2.1.5, see https://github.com/open-mpi/ompi/issues/1838#issuecomment-230201439
ADD 111.patch /openmpi/openmpi-2.1.5/opal/mca/pmix/pmix112/pmix
RUN cd /openmpi/openmpi-2.1.5/opal/mca/pmix/pmix112/pmix && patch -p1 < 111.patch
RUN cd /openmpi/openmpi-2.1.5 && ./configure --enable-shared --enable-static --prefix=/opt/openmpi/gnu && make -sj$(grep -c processor /proc/cpuinfo) install
RUN rm -rf /openmpi
ENV PATH /opt/openmpi/gnu/bin:$PATH
ENV OMPI_MCA_plm isolated
# Create symbolic link to /lib/cpp for the charm++ build, see
# https://lists.cs.illinois.edu/lists/arc/charm/2016-05/msg00013.html
RUN ln -s /usr/bin/cpp /lib/cpp
# Configure user
RUN addgroup quinoa
RUN adduser -S quinoa quinoa
RUN chown -R quinoa:quinoa /home/quinoa
USER quinoa
WORKDIR /home/quinoa
# Clone quinoa
RUN git clone --recurse-submodules http://github.com/quinoacomputing/quinoa.git
# Pull in docker build arg: COMMIT
ARG COMMIT
# Checkout specific commit
RUN cd quinoa && git checkout $COMMIT && git log -1 HEAD
# Update submodules
RUN cd quinoa && git submodule init && git submodule update --recursive && cd external && git submodule init && git submodule update --recursive && cd .. && git submodule status --recursive
# Build TPLs with gnu as shared libs
RUN cd quinoa && mkdir -p external/build/gnu && cd external/build/gnu && export PATH=/opt/openmpi/gnu/bin:$PATH && cmake -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_BUILD_TYPE=Release -DENABLE_OMEGA_H=true -DENABLE_DOXYGEN=false -DENABLE_MCSS=false -DCHARM_EXTRA_ARGS="--enable-error-checking" -DCMAKE_INSTALL_PREFIX=/home/quinoa/external/gnu -DCXXFLAGS="-w -fpermissive" ../.. && make -sj$(grep -c processor /proc/cpuinfo)
# Remove quinoa (keep only TPLs)
RUN rm -rf /home/quinoa/quinoa