-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from hariharan-devarajan/hariharan/docker_fix
Hariharan/docker fix
- Loading branch information
Showing
5 changed files
with
118 additions
and
103 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
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 $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 |
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,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 |
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,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 |