Commit 896d3a9a authored by Lloyd Connellan's avatar Lloyd Connellan
Browse files

copy of dune-python docker

MAINTAINER "Martin Nolte"
USER root
RUN apt-get update && apt-get dist-upgrade --yes --no-install-recommends
RUN apt-get install --yes --no-install-recommends \
libeigen3-dev libsuitesparse-dev \
ADD /root/
RUN /root/
COPY example.ipynb /dune/
RUN chown dune:dune /dune/example.ipynb
USER dune
# RUN cp -r /usr/local/share/doc/dune-fempy/jupyter /dune/dune-fempy
# COPY --chown=dune:dune twophaseflow.ipynb utility.hh /dune/
# dockerproject
A template for setting up docker images for dune-python.
The idea is to copy all files into your own git repository and adapt
__Note__: that the Docker container for `example' is not uploaded.
# How to Build/Update/Run the Docker Image
To update the Docker image on ``,
please follow these steps:
__Note__: you will have to change the
`andreas.dedner/example` to your own local space and desired container
1. Pull the Docker base image:
docker pull
Please do not omit this step just because you already have the image. Otherwise
an outdated version of the base image might be used.
1. Actually build the Docker image:
docker build . --no-cache -t
Please do not omit `--no-cache` to ensure every step of the build is actually
*Note*: This will set up the Debian base system of the Docker image, which takes
quite some time.
1. Verify your build by testing the Docker image locally:
docker run --rm -v dune:/dune -p
Use your favorite web browser, visit, enter the password
`dune`, and run the demo notebooks (depending on the jupyter version you
might be given tokenized http address to use instead).
*Note*: If you already have a volume `dune`, you will not receive the updated demo notebooks. It might be better to start with a clean volume.
1. Log into the Docker registry:
docker login
1. Push the Docker image:
docker push
This step actually updates the Docker image on the server.
**Warning:** Updating the official Docker image affects all users of the
image once they pull it.
Make sure you don't push a buggy combination of the DUNE modules.
1. Log out of the Docker registry:
docker logout
That's it.
"cells": [
"cell_type": "markdown",
"metadata": {},
"source": [
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import math\n",
"from ufl import *\n",
"from dune.ufl import Space, NamedConstant\n",
"import dune.fem as fem\n",
"import dune.create as create\n",
"from dune.generator import algorithm\n",
"from dune.common import FieldVector\n",
"from dune.grid import cartesianDomain, Marker, gridFunction\n",
"from dune.fem.function import levelFunction, integrate\n",
"from dune.plotting import plotPointData as plot\n"
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"nbformat": 4,
"nbformat_minor": 2
# coding: utf-8
# Preamble
# ========
# In[ ]:
import math
from ufl import *
from dune.ufl import Space, NamedConstant
import dune.fem as fem
import dune.create as create
from dune.generator import algorithm
from dune.common import FieldVector
from dune.grid import cartesianDomain, Marker, gridFunction
from dune.fem.function import levelFunction, integrate
from dune.plotting import plotPointData as plot
set -e
mkdir /tmp/dune
cd /tmp/dune
export CMAKE_FLAGS=" \
wget -qO - | tar xz
wget -qO - | tar xz
dunecontrol all
dunecontrol make install
cd /
rm -rf /tmp/dune
This diff is collapsed.
Markdown is supported
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