-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
ARG tag=latest | ||
FROM ubuntu:${tag} | ||
|
||
# see proxy apps here https://github.com/ECP-copa/Cabana/wiki/4-Apps | ||
# and examples https://github.com/ECP-copa/Cabana/tree/master/example | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && \ | ||
apt-get -qq install -y --no-install-recommends \ | ||
openssh-client openssh-server \ | ||
locales \ | ||
ca-certificates \ | ||
curl \ | ||
wget \ | ||
libhdf5-serial-dev \ | ||
apt-utils \ | ||
cmake \ | ||
clang \ | ||
clang-format \ | ||
doxygen \ | ||
mpich \ | ||
libmpich-dev \ | ||
git \ | ||
jq \ | ||
build-essential \ | ||
libgtest-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV KOKKOS_SRC_DIR=/opt/kokkos | ||
ENV KOKKOS_INSTALL_DIR=$KOKKOS_SRC_DIR/build/install | ||
ENV MAKE_CXX_FLAG="MPICXX=mpic++" | ||
|
||
RUN git clone https://github.com/kokkos/kokkos.git /opt/kokkos && \ | ||
cd /opt/kokkos && \ | ||
git checkout 3.4.01 && \ | ||
mkdir build && cd build && \ | ||
cmake -D CMAKE_BUILD_TYPE="Release" \ | ||
-D CMAKE_INSTALL_PREFIX=$KOKKOS_INSTALL_DIR \ | ||
-D Kokkos_ENABLE_OPENMP=ON \ | ||
-D Kokkos_ENABLE_SERIAL=ON .. && \ | ||
make install | ||
|
||
ENV CABANA_INSTALL_DIR=/opt/Cabana/build/install | ||
RUN git clone https://github.com/ECP-copa/Cabana.git /opt/Cabana && \ | ||
cd /opt/Cabana && \ | ||
git checkout 0.4.0 && \ | ||
mkdir build && cd build && \ | ||
cmake \ | ||
-D CMAKE_BUILD_TYPE="Release" \ | ||
-D CMAKE_PREFIX_PATH=$KOKKOS_INSTALL_DIR \ | ||
-D CMAKE_INSTALL_PREFIX="$CABANA_INSTALL_DIR" \ | ||
-D Cabana_REQUIRE_OPENMP=ON \ | ||
-D Cabana_ENABLE_EXAMPLES=ON \ | ||
-D Cabana_ENABLE_TESTING=ON \ | ||
-D Cabana_REQUIRE_HDF5=ON \ | ||
-D Cabana_ENABLE_PERFORMANCE_TESTING=OFF \ | ||
-D Cabana_ENABLE_CAJITA=ON .. && \ | ||
make install | ||
|
||
# Examples are here | ||
WORKDIR /opt/Cabana/build/example | ||
|
||
# Hack for ssh for now... | ||
RUN echo " LogLevel ERROR" >> /etc/ssh/ssh_config && \ | ||
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ | ||
echo " UserKnownHostsFile=/dev/null" >> /etc/ssh/ssh_config && \ | ||
cd /root && \ | ||
mkdir -p /run/sshd && \ | ||
ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa && chmod og+rX . && \ | ||
cd .ssh && cat id_rsa.pub > authorized_keys && chmod 644 authorized_keys |