From f87277042969ac4b24b3f0089779e9afc2f28e9d Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Wed, 10 Feb 2021 21:59:41 -0600 Subject: [PATCH 1/5] fixed duplicate target names. --- adapter/test/stdio/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/test/stdio/CMakeLists.txt b/adapter/test/stdio/CMakeLists.txt index 24bebe12b..d0c9a3900 100644 --- a/adapter/test/stdio/CMakeLists.txt +++ b/adapter/test/stdio/CMakeLists.txt @@ -45,7 +45,7 @@ set_target_properties(hermes_stdio_adapter_mpi_test PROPERTIES COMPILE_FLAGS "-D mpi_daemon(hermes_stdio_adapter_mpi_test 2 "~[request_size=range-large]" "" 1) mpi_daemon(hermes_stdio_adapter_mpi_test 2 "[request_size=range-large]" "large" 1) if(HERMES_INSTALL_TESTS) - set(STDIO_TESTS stdio_adapter_mapper_test stdio_adapter_mapper_test stdio_adapter_test hermes_stdio_adapter_test stdio_adapter_mpi_test hermes_stdio_adapter_mpi_test) + set(STDIO_TESTS stdio_adapter_mapper_test stdio_adapter_test hermes_stdio_adapter_test stdio_adapter_mpi_test hermes_stdio_adapter_mpi_test) foreach(program ${STDIO_TESTS}) install( TARGETS From 73610dec454f8b07b6f77c5c5cc308491c235a0e Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Thu, 11 Feb 2021 09:48:55 -0600 Subject: [PATCH 2/5] fixed package name. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 47ab4dab8..6c6e3791e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends git \ build-essential \ python \ - vi \ + vim \ sudo \ unzip \ cmake \ From 2bd254740efcdc4ca5ab45c6452afcb87f8ace6d Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Fri, 12 Feb 2021 14:58:52 -0600 Subject: [PATCH 3/5] split docker files into two files. --- Dockerfile | 102 ------------------------------------------------ deps.Dockerfile | 75 +++++++++++++++++++++++++++++++++++ dev.Dockerfile | 23 +++++++++++ 3 files changed, 98 insertions(+), 102 deletions(-) delete mode 100644 Dockerfile create mode 100644 deps.Dockerfile create mode 100644 dev.Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6c6e3791e..000000000 --- a/Dockerfile +++ /dev/null @@ -1,102 +0,0 @@ -FROM ubuntu:18.04 - -ENV USER=hermes -RUN useradd -ms /bin/bash $USER -RUN su - $USER -c "touch me" - -RUN apt-get update -q && \ - apt-get install -yq gcc g++ - -RUN apt-get install -y sudo -RUN echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USER && \ - chmod 0440 /etc/sudoers.d/$USER - -RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - ca-certificates \ - curl \ - environment-modules \ - git \ - build-essential \ - python \ - vim \ - sudo \ - unzip \ - cmake \ - lcov \ - zlib1g-dev \ - libsdl2-dev \ - gfortran - -USER $USER - -ENV HOME=/home/$USER - -ENV PROJECT=$HOME/source -ENV INSTALL_DIR=$HOME/install -ENV SPACK_DIR=$HOME/spack -ENV SDS_DIR=$HOME/sds - -RUN echo $INSTALL_DIR && mkdir -p $INSTALL_DIR - -RUN git clone https://github.com/spack/spack ${SPACK_DIR} -RUN git clone https://xgitlab.cels.anl.gov/sds/sds-repo.git ${SDS_DIR} -RUN git clone https://github.com/HDFGroup/hermes ${PROJECT} - -ENV spack=${SPACK_DIR}/bin/spack - -RUN . ${SPACK_DIR}/share/spack/setup-env.sh - -RUN echo $GITPOD_REPO_ROOT - -RUN $spack repo add ${SDS_DIR} -RUN $spack repo add $PROJECT/ci/hermes - -RUN $spack compiler find - -RUN $spack compiler list - -ENV HERMES_VERSION=master - -ENV HERMES_SPEC="hermes@${HERMES_VERSION}" -RUN $spack install ${HERMES_SPEC} - -RUN $spack view --verbose symlink -i ${INSTALL_DIR} ${HERMES_SPEC} - -RUN mkdir $PROJECT/build -ENV CXXFLAGS="${CXXFLAGS} -std=c++17 -Werror -Wall -Wextra" -ENV PATH="${INSTALL_DIR}/bin:${PATH}" -RUN cd $PROJECT/build && \ - cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ - -DCMAKE_PREFIX_PATH=${INSTALL_DIR} \ - -DCMAKE_BUILD_RPATH=${INSTALL_DIR}/lib \ - -DCMAKE_INSTALL_RPATH=${INSTALL_DIR}/lib \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_COMPILER=`which mpicxx` \ - -DCMAKE_C_COMPILER=`which mpicc` \ - -DBUILD_SHARED_LIBS=ON \ - -DHERMES_ENABLE_COVERAGE=ON \ - -DHERMES_INTERCEPT_IO=ON \ - -DHERMES_COMMUNICATION_MPI=ON \ - -DHERMES_BUILD_BUFFER_POOL_VISUALIZER=OFF \ - -DORTOOLS_DIR=${INSTALL_PREFIX} \ - -DHERMES_USE_ADDRESS_SANITIZER=ON \ - -DHERMES_USE_THREAD_SANITIZER=OFF \ - -DHERMES_RPC_THALLIUM=ON \ - -DHERMES_DEBUG_HEAP=OFF \ - -DBUILD_TESTING=ON \ - .. - -RUN cd $PROJECT/build && \ - cmake --build . -- -j - -WORKDIR $HOME - -RUN echo "export PATH=${SPACK_DIR}/bin:$PATH" >> /home/$USER/.bashrc -RUN echo ". ${SPACK_DIR}/share/spack/setup-env.sh" >> /home/$USER/.bashrc -RUN echo "export CFLAGS=-I${INSTALL_DIR}/include" >> /home/$USER/.bashrc -RUN echo "export CXXFLAGS=-I${INSTALL_DIR}/include" >> /home/$USER/.bashrc -RUN echo "export LDFLAGS=-L${INSTALL_DIR}/lib" >> /home/$USER/.bashrc -RUN echo "export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:\$LD_LIBRARY_PATH" >> /home/$USER/.bashrc - diff --git a/deps.Dockerfile b/deps.Dockerfile new file mode 100644 index 000000000..bc119a9e6 --- /dev/null +++ b/deps.Dockerfile @@ -0,0 +1,75 @@ +FROM ubuntu:18.04 + +ENV USER=hermes +RUN useradd -ms /bin/bash $USER +RUN su - $USER -c "touch me" + +RUN apt-get update -q && \ + apt-get install -yq gcc g++ + +RUN apt-get install -y sudo +RUN echo "${USER} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USER && \ + chmod 0440 /etc/sudoers.d/$USER + +RUN cat /etc/sudoers.d/$USER + +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + ca-certificates \ + curl \ + environment-modules \ + git \ + build-essential \ + python \ + vim \ + sudo \ + unzip \ + cmake \ + lcov \ + zlib1g-dev \ + libsdl2-dev \ + gfortran + +USER $USER + +RUN sudo apt-get update -q + +ENV HOME=/home/$USER + +ENV PROJECT=$HOME/source +ENV INSTALL_DIR=$HOME/install +ENV SPACK_DIR=$HOME/spack +ENV SDS_DIR=$HOME/sds + +RUN echo $INSTALL_DIR && mkdir -p $INSTALL_DIR + +RUN git clone https://github.com/spack/spack ${SPACK_DIR} +RUN git clone https://xgitlab.cels.anl.gov/sds/sds-repo.git ${SDS_DIR} +RUN git clone https://github.com/HDFGroup/hermes ${PROJECT} + + +ENV spack=${SPACK_DIR}/bin/spack + +RUN . ${SPACK_DIR}/share/spack/setup-env.sh + +RUN echo $GITPOD_REPO_ROOT + +RUN $spack repo add ${SDS_DIR} +RUN $spack repo add $PROJECT/ci/hermes + +RUN $spack compiler find + +RUN $spack compiler list + +ENV HERMES_VERSION=master + +ENV HERMES_SPEC="hermes@${HERMES_VERSION}" +RUN $spack install --only dependencies ${HERMES_SPEC} + +RUN echo "export PATH=${SPACK_DIR}/bin:$PATH" >> /home/$USER/.bashrc +RUN echo ". ${SPACK_DIR}/share/spack/setup-env.sh" >> /home/$USER/.bashrc + +ENV PATH=${INSTALL_DIR}/bin:$PATH + +WORKDIR $HOME \ No newline at end of file diff --git a/dev.Dockerfile b/dev.Dockerfile new file mode 100644 index 000000000..d443e4fb5 --- /dev/null +++ b/dev.Dockerfile @@ -0,0 +1,23 @@ +FROM hdevarajan92/hermes-dep:latest + +RUN sudo apt-get update -q + +USER $USER + +ENV HOME=/home/$USER + +ENV INSTALL_DIR=$HOME/install + +ENV PROJECT=$HOME/hermes + +RUN $spack install --only package ${HERMES_SPEC} + +RUN echo "spack load --only dependencies ${HERMES_SPEC}" >> /home/$USER/.bashrc +RUN echo "export CC=`which mpicc`" >> /home/$USER/.bashrc +RUN echo "export CXX=`which mpicxx`" >> /home/$USER/.bashrc + +RUN git clone https://github.com/HDFGroup/hermes ${PROJECT} +RUN sh /home/$USER/.bashrc + +RUN mkdir -p $PROJECT/build +WORKDIR $PROJECT/build \ No newline at end of file From 35e69c951730be56c979688b59d8e108063420a0 Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Wed, 17 Feb 2021 13:06:00 -0600 Subject: [PATCH 4/5] added user docker file. --- user.Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 user.Dockerfile diff --git a/user.Dockerfile b/user.Dockerfile new file mode 100644 index 000000000..3f1a3c1d3 --- /dev/null +++ b/user.Dockerfile @@ -0,0 +1,21 @@ +FROM hdevarajan92/hermes-dep:latest + +RUN sudo apt-get update -q + +USER $USER + +ENV HOME=/home/$USER + +ENV INSTALL_DIR=$HOME/install + +ENV PROJECT=$HOME/hermes + +RUN $spack install --only package ${HERMES_SPEC} + +RUN echo "spack load ${HERMES_SPEC}" >> /home/$USER/.bashrc +RUN echo "export CC=`which mpicc`" >> /home/$USER/.bashrc +RUN echo "export CXX=`which mpicxx`" >> /home/$USER/.bashrc + +RUN sh /home/$USER/.bashrc + +WORKDIR $HOME \ No newline at end of file From 76ee9a51b81e309182d5d20b4bda1d128648d296 Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Fri, 19 Feb 2021 08:58:56 -0600 Subject: [PATCH 5/5] removed check for gitpod env. --- deps.Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/deps.Dockerfile b/deps.Dockerfile index bc119a9e6..bd00a8122 100644 --- a/deps.Dockerfile +++ b/deps.Dockerfile @@ -53,8 +53,6 @@ ENV spack=${SPACK_DIR}/bin/spack RUN . ${SPACK_DIR}/share/spack/setup-env.sh -RUN echo $GITPOD_REPO_ROOT - RUN $spack repo add ${SDS_DIR} RUN $spack repo add $PROJECT/ci/hermes @@ -72,4 +70,4 @@ RUN echo ". ${SPACK_DIR}/share/spack/setup-env.sh" >> /home/$USER/.bashrc ENV PATH=${INSTALL_DIR}/bin:$PATH -WORKDIR $HOME \ No newline at end of file +WORKDIR $HOME