From 546443534b105cae7852d1666e6224cf2855599f Mon Sep 17 00:00:00 2001
From: Soeren Peters <github@soerenpeters.com>
Date: Thu, 3 Feb 2022 13:55:33 +0100
Subject: [PATCH] Add Dockerfiles and adapt ci file to use prebuild images from
 the development repository.

---
 .gitlab-ci.yml                                |  4 +--
 Containers/dockerfiles/Ubuntu20_04.Dockerfile | 28 ++++++++++++++++
 .../dockerfiles/Ubuntu20_04_Python.Dockerfile | 33 +++++++++++++++++++
 3 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 Containers/dockerfiles/Ubuntu20_04.Dockerfile
 create mode 100644 Containers/dockerfiles/Ubuntu20_04_Python.Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5ca6a391b..d259b2bc5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 ###############################################################################
 ##                       VirtualFluids CI Pipeline                           ##
 ###############################################################################
-image: irmb/virtualfluids-python-deps-ubuntu20.04:latest
+image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04_python:1.0
 
 stages:
   - build
@@ -17,7 +17,7 @@ stages:
 .gnu_build_template:
   stage: build
 
-  image: irmb/virtualfluids-deps-ubuntu20.04:latest
+  image: git.rz.tu-bs.de:4567/irmb/virtualfluids_dev/ubuntu20_04:1.0
 
   tags:
     - gpu
diff --git a/Containers/dockerfiles/Ubuntu20_04.Dockerfile b/Containers/dockerfiles/Ubuntu20_04.Dockerfile
new file mode 100644
index 000000000..1b3d64655
--- /dev/null
+++ b/Containers/dockerfiles/Ubuntu20_04.Dockerfile
@@ -0,0 +1,28 @@
+# VirtualFluids BuildDependencies:
+# Ubuntu 20.04
+# general tools: wget, unzip, git
+# CMake 3.20.5
+# ccache
+# gcc 9.3 (default)
+# openmpi 4.0.3
+# openmp
+# cuda 11.3.1 as base image
+# clang 10.0 (default)
+
+FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt-get update &&\
+    apt-get install -y\
+    wget unzip git \
+    build-essential gdb\
+    ccache \
+    ninja-build \
+    openmpi-bin=4.0.3-0ubuntu1 \
+    libomp-dev \
+    clang clang-format clang-tidy clang-tools llvm-dev libclang-dev &&\
+    mkdir -p /usr/local/cmake/ && cd /usr/local/cmake/ &&\
+    version=3.20 && build=5 &&\
+    wget https://cmake.org/files/v$version/cmake-$version.$build-linux-x86_64.tar.gz &&\
+    tar -xzvf cmake-$version.$build-linux-x86_64.tar.gz &&\
+    ln -s /usr/local/cmake/cmake-$version.$build-linux-x86_64/bin/* /usr/local/bin/
\ No newline at end of file
diff --git a/Containers/dockerfiles/Ubuntu20_04_Python.Dockerfile b/Containers/dockerfiles/Ubuntu20_04_Python.Dockerfile
new file mode 100644
index 000000000..9a5459aac
--- /dev/null
+++ b/Containers/dockerfiles/Ubuntu20_04_Python.Dockerfile
@@ -0,0 +1,33 @@
+FROM irmb/virtualfluids-deps-ubuntu20.04:latest
+
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt-get update &&    \
+    apt-get install -y   \
+        python3          \
+        python3-venv     \
+        python3-pip      \
+        uuid-dev         \
+        libgpgme-dev     \
+        squashfs-tools   \
+        libseccomp-dev   \
+        pkg-config       \
+        cryptsetup-bin   \
+        golang           \
+        libgl1           \
+    && pip3 install      \
+        setuptools       \
+        wheel            \
+        scikit-build     \
+        pyvista          \
+        numpy            \
+        ansible          \
+    && export VERSION=3.8.0 \
+    && wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz \
+    && tar -xzf singularity-ce-${VERSION}.tar.gz
+
+WORKDIR /singularity-ce-3.8.0
+RUN ./mconfig && \
+    make -C ./builddir && \
+    make -C ./builddir install
+
+WORKDIR /
\ No newline at end of file
-- 
GitLab