-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor image builds and add cuda variant
- Loading branch information
Showing
7 changed files
with
1,213 additions
and
6 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,28 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ARG num_jobs | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl git git-lfs clang clang-tools clangd cmake autoconf \ | ||
automake gdb git libffi-dev zlib1g-dev python3-pip \ | ||
libssl-dev xz-utils pkgconf gfortran openmpi-bin libopenmpi-dev \ | ||
wget libarchive-tools htop | ||
|
||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 && \ | ||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 | ||
|
||
ENV OMPI_CC=clang | ||
ENV OMPI_CXX=clang++ | ||
ENV LD_LIBRARY_PATH=/usr/local/lib | ||
|
||
WORKDIR /opt/archives | ||
|
||
# metis | ||
RUN curl -L https://github.com/mfem/tpls/blob/gh-pages/metis-5.1.0.tar.gz?raw=true > /opt/archives/metis-5.1.0.tgz | ||
RUN tar xzf metis-5.1.0.tgz && cd metis-5.1.0 && \ | ||
make config shared=1 cc=mpicc prefix=/usr/local && make -j ${num_jobs} && make install | ||
|
||
RUN useradd --create-home --shell /bin/bash euler | ||
|
||
USER euler | ||
WORKDIR /home/euler |
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 mfem/containers/base | ||
|
||
ARG num_jobs | ||
ARG hypre_version | ||
|
||
USER root | ||
|
||
WORKDIR /opt/archives | ||
|
||
# hypre | ||
RUN curl -L https://github.com/hypre-space/hypre/archive/refs/tags/v${hypre_version}.tar.gz > /opt/archives/hypre-v${hypre_version}.tar.gz | ||
RUN tar xzf hypre-v${hypre_version}.tar.gz && cd hypre-${hypre_version}/src && \ | ||
./configure --prefix /usr/local --enable-shared --disable-static && \ | ||
make -j ${num_jobs} && make install | ||
|
||
USER euler | ||
WORKDIR /home/euler | ||
|
||
# MFEM repo checkout | ||
RUN git clone --depth=1 https://github.com/mfem/mfem.git mfem | ||
COPY --chown=euler:euler user.mk mfem/config/user.mk | ||
# Run config/make s.t. first use is a bit quicker | ||
# RUN cd mfem && make config && make -j ${num_jobs} && cd examples && make ex1 && make ex1p |
Oops, something went wrong.