Commit 3f244d72 authored by Timo Koch's avatar Timo Koch
Browse files

[viplab] Sample container for app

parent 0365b2e6
# An example runner for ViPLab
FROM ubuntu:bionic
MAINTAINER timokoch <timo.koch@iws.uni-stuttgart.de>
# cleanup
RUN rm -f /etc/apt/apt.conf.d/docker-gzip-indexes && \
rm -rf /var/lib/apt/lists/*
# get the package list
RUN apt-get update && apt-get dist-upgrade --no-install-recommends --yes && \
apt-get install --no-install-recommends --yes \
ca-certificates \
ssh \
vim \
python-dev \
python-pip \
libffi-dev \
git \
pkg-config \
build-essential \
gfortran \
cmake \
mpi-default-dev \
mpi-default-bin \
libsuitesparse-dev \
zlib1g-dev \
ninja-build \
wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# create a data folder
RUN mkdir -p /data
# create source directory
RUN mkdir -p /data/src
WORKDIR /data/src/
RUN git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-common.git && \
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-geometry.git && \
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-grid.git && \
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-istl.git && \
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-localfunctions.git && \
git clone -b master https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
# create system-wide symlink to dunecontrol for convenience
RUN ln -s /data/src/dune-common/bin/dunecontrol /usr/bin/dunecontrol
# The opts file to run dune control
ADD gcc.opts /data/opts/cmake.opts
# The runner script
ADD run.sh /data/bin/run.sh
RUN chmod +x /data/bin/run.sh
# run dunecontrol
RUN mkdir -p /data/build
RUN dunecontrol --opts=/data/opts/cmake.opts --builddir=/data/build --module=dumux all
# compile the test executable
RUN ninja -C /data/build/dumux/ test_1p_box
# create the shared volume
VOLUME /data/shared
# run simulation wrapper entry point
WORKDIR /data/shared
ENTRYPOINT ["/data/bin/run.sh"]
# run systemd-resolve --status to get the dns server and put in /etc/docker/daemon.json
docker build -t git.iws.uni-stuttgart.de:4567/dumux-repositories/dumux-docker/viplab/test .
#!/bin/bash
docker run --user $(id -u):$(id -g) -v $(pwd):/data/shared dumux/viplab/test params.input
GXX_RELEASE_WARNING_OPTS=" \
-Wall \
-Wunused \
-Wmissing-include-dirs \
-Wcast-align \
-Wno-missing-braces \
-Wmissing-field-initializers \
-Wno-sign-compare"
GXX_RELEASE_OPTS=" \
-fdiagnostics-color=always \
-fno-strict-aliasing \
-fstrict-overflow \
-fno-finite-math-only \
-O3 \
-funroll-loops \
-g0"
CMAKE_FLAGS="
-DCMAKE_GENERATOR='Ninja'
-DCMAKE_MAKE_PROGRAM='/usr/bin/ninja'
-DCMAKE_C_COMPILER=/usr/bin/gcc
-DCMAKE_CXX_COMPILER=/usr/bin/g++
-DCMAKE_CXX_FLAGS_RELEASE='$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS'
-DCMAKE_CXX_FLAGS_DEBUG='-O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare'
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS -g -ggdb -Wall'
-DCMAKE_BUILD_TYPE=Release
-DUSE_MPI=ON
"
[TimeLoop]
DtInitial = 1 # [s]
TEnd = 1 # [s]
[Grid]
LowerLeft = 0 0
UpperRight = 1 1
Cells = 10 10
[Problem]
Name = 1ptestfv # name passed to the output routines
[SpatialParams]
LensLowerLeft = 0.2 0.2
LensUpperRight = 0.8 0.8
Permeability = 1e-10 # [m^2]
PermeabilityLens = 1e-12 # [m^2]
#!/bin/bash
/data/build/dumux/test/porousmediumflow/1p/implicit/isothermal/test_1p_box "$@"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment