-
Notifications
You must be signed in to change notification settings - Fork 43
Docker container for ci test #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9ecb128
docker container recipe for dreamer2368/librom_env:v0.0.0
dreamer2368 be87af8
Dockerfile: mfem will be checked out from the specific commit of the …
dreamer2368 732e4ce
ci linux test using docker container.
dreamer2368 10dc8f7
Docker container recipe for v0.1.0.
dreamer2368 10dfa1d
commenting the failing tests.
dreamer2368 999e82e
add workflow_dispatch in ci work flow.
dreamer2368 c870d58
Docker recipe for dreamer2368/librom_env:v0.2.0
dreamer2368 de86c82
parallel test for RandomizedSVD is commented, until issue #193 is res…
dreamer2368 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,148 @@ | ||
| FROM ubuntu:22.04 | ||
|
|
||
| ENV ENVDIR=env | ||
|
|
||
| # install sudo | ||
| RUN apt-get -yq update && apt-get -yq install sudo | ||
|
|
||
| WORKDIR /$ENVDIR | ||
|
|
||
| # install packages | ||
| RUN sudo apt-get install -yq git | ||
| RUN sudo apt-get install --no-install-recommends -yq make gcc gfortran libssl-dev cmake | ||
| RUN sudo apt-get install -yq libopenblas-dev libmpich-dev libblas-dev liblapack-dev libscalapack-mpi-dev libhdf5-serial-dev | ||
| RUN sudo apt-get install -yq vim | ||
| RUN sudo apt-get install -yq git-lfs | ||
| RUN sudo apt-get install -yq valgrind | ||
| RUN sudo apt-get install -yq wget | ||
|
|
||
| RUN sudo apt-get clean -q | ||
|
|
||
| # download dependencies | ||
| ENV LIB_DIR=/$ENVDIR/dependencies | ||
| WORKDIR $LIB_DIR | ||
|
|
||
| #RUN wget -O mfem-4.5.tar.gz https://github.com/mfem/mfem/archive/refs/tags/v4.5.tar.gz | ||
| RUN wget -O hypre-2.20.0.tar.gz https://github.com/hypre-space/hypre/archive/refs/tags/v2.20.0.tar.gz | ||
|
|
||
| # Instead of the original parmetis link (which is often unavailable), use the link to librom master branch: | ||
| # RUN wget -O parmetis-4.0.3.tar.gz http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz | ||
| RUN wget -O parmetis-4.0.3.tar.gz https://github.com/LLNL/libROM/raw/master/dependencies/parmetis-4.0.3.tar.gz | ||
|
|
||
| RUN wget -O gslib-1.0.7.tar.gz https://github.com/gslib/gslib/archive/v1.0.7.tar.gz | ||
| #RUN wget -O glvis-4.2.tar.gz https://github.com/GLVis/glvis/archive/refs/tags/v4.2.tar.gz | ||
| #RUN wget -O metis-4.0.3.tar.gz https://github.com/mfem/tpls/raw/gh-pages/metis-4.0.3.tar.gz | ||
|
|
||
|
|
||
| ENV CFLAGS="-fPIC" | ||
| ENV CPPFLAGS="-fPIC" | ||
| ENV CXXFLAGS="-fPIC" | ||
|
|
||
| # install hypre | ||
| RUN tar -zxvf hypre-2.20.0.tar.gz | ||
| RUN mv hypre-2.20.0 hypre | ||
| WORKDIR ./hypre/src/ | ||
| RUN ./configure --disable-fortran | ||
| RUN make -j | ||
| WORKDIR $LIB_DIR | ||
|
|
||
| # install gslib | ||
| ENV MG=YES | ||
| RUN tar -zxvf gslib-1.0.7.tar.gz | ||
| RUN mv gslib-1.0.7 gslib | ||
| WORKDIR ./gslib | ||
| RUN make CC=mpicc -j | ||
| WORKDIR $LIB_DIR | ||
|
|
||
| ## install metis | ||
| #RUN tar -zxvf metis-4.0.3.tar.gz | ||
| #WORKDIR ./metis-4.0.3 | ||
| #RUN make OPTFLAGS=-Wno-error=implicit-function-declaration | ||
| #WORKDIR $LIB_DIR | ||
| #RUN ln -s metis-4.0.3 metis-4.0 | ||
|
|
||
| # install parmetis | ||
| RUN tar -zxvf parmetis-4.0.3.tar.gz | ||
| WORKDIR ./parmetis-4.0.3 | ||
| RUN make config | ||
| RUN make | ||
|
|
||
| # These environment variables are for mfem build. | ||
| # Need different values for libROM build. | ||
| ENV METIS_DIR=${LIB_DIR}/parmetis-4.0.3 | ||
| ENV METIS_OPT=-I${METIS_DIR}/metis/include | ||
| WORKDIR ${METIS_DIR}/build | ||
| # Currently docker cannot save command results to environment variables. | ||
| # These variables are for libROM build. | ||
| ENV MACHINE_ARCH=Linux-x86_64 | ||
| RUN ln -s $MACHINE_ARCH lib | ||
| WORKDIR ${METIS_DIR}/build/lib/libparmetis | ||
| RUN ln -s ./ lib | ||
| RUN ln -s ${METIS_DIR}/metis metis | ||
| WORKDIR ${METIS_DIR}/build/lib/libmetis | ||
| RUN ln -s ./ lib | ||
| ENV METIS_LIB="-L${METIS_DIR}/build/lib/libparmetis -lparmetis -L${METIS_DIR}/build/lib/libmetis -lmetis" | ||
|
|
||
| ENV CFLAGS= | ||
| ENV CPPFLAGS= | ||
| ENV CXXFLAGS= | ||
|
|
||
| WORKDIR $LIB_DIR | ||
|
|
||
| # install mfem | ||
| RUN git clone https://github.com/mfem/mfem.git mfem_parallel | ||
| WORKDIR ./mfem_parallel | ||
| # Latest verified commit on May 2, 2023 | ||
| RUN git checkout e5231334e6a8175b4f404b877f590b73dee2dedc | ||
| #RUN tar -zxvf mfem-4.5.tar.gz | ||
| #RUN mv mfem-4.5 mfem_parallel | ||
| #RUN git pull | ||
| #RUN make serial -j 4 | ||
| RUN make parallel -j 4 STATIC=NO SHARED=YES MFEM_USE_MPI=YES MFEM_USE_GSLIB=${MG} MFEM_USE_METIS=YES MFEM_USE_METIS_5=YES METIS_DIR="$METIS_DIR" METIS_OPT="$METIS_OPT" METIS_LIB="$METIS_LIB" | ||
| RUN ln -s ./ lib | ||
| RUN ln -s ./ include | ||
| WORKDIR $LIB_DIR | ||
| RUN ln -s mfem_parallel mfem | ||
|
|
||
| # install googletest | ||
| WORKDIR $LIB_DIR | ||
| RUN git clone https://github.com/google/googletest | ||
| WORKDIR ./googletest | ||
| # Last release that supports c++11 | ||
| RUN git checkout tags/release-1.12.1 -b v1.12.1 | ||
| WORKDIR ./build | ||
| RUN cmake .. | ||
| RUN make | ||
| RUN sudo make install | ||
|
|
||
| # clean up | ||
| WORKDIR $LIB_DIR | ||
| RUN rm *.tar.gz | ||
|
|
||
| # cmake toolchain file for librom | ||
| RUN echo 'set(CMAKE_C_COMPILER mpicc)\n\ | ||
| set(CMAKE_CXX_COMPILER mpicxx)\n\ | ||
| set(CMAKE_Fortran_COMPILER mpif90)\n\ | ||
| set(LIB_DIR /env/dependencies)\n\ | ||
| set(MFEM_DIR ${LIB_DIR}/mfem)\n\ | ||
| set(HYPRE_DIR ${LIB_DIR}/hypre/src/hypre)\n\ | ||
| set(PARMETIS_DIR ${LIB_DIR}/parmetis-4.0.3/build/lib/libparmetis)\n\ | ||
| set(METIS_DIR ${LIB_DIR}/parmetis-4.0.3/build/lib/libmetis)' > ./librom_env.cmake | ||
|
|
||
| # flags for libROM cmake | ||
| ENV TOOLCHAIN_FILE=$LIB_DIR/librom_env.cmake | ||
| ENV BUILD_TYPE=Optimized | ||
| ENV USE_MFEM=On | ||
| ENV MFEM_USE_GSLIB=On | ||
| ENV MFEM_DIR=$LIB_DIR/mfem | ||
| ENV HYPRE_DIR=$LIB_DIR/hypre/src/hypre | ||
| ENV PARMETIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libparmetis | ||
| ENV METIS_DIR=$LIB_DIR/parmetis-4.0.3/build/lib/libmetis | ||
|
|
||
| # create and switch to a user | ||
| ENV USERNAME=test | ||
| RUN echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
| RUN useradd --no-log-init -u 1001 --create-home --shell /bin/bash $USERNAME | ||
| RUN adduser $USERNAME sudo | ||
| USER $USERNAME | ||
| WORKDIR /home/$USERNAME |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.