/cuda-petsc-fenics-docker

Primary LanguageShellBSD 2-Clause "Simplified" LicenseBSD-2-Clause

NVIDIA CUDA powered Docker, PETSc for FEniCS

This repository contains the scripts for building a CUDA powered Docker image for FEniCS. This is done by using the original Docker files of the fenicsproject, which can be found at fenics-project/docker and expand these with the NVIDIA CUDA Docker Images.

Requirements on host PC

  1. Nvidia GPU with CUDA support on Host/Server
    1. NVIDIA CUDA driver on Host OS
  2. Docker Engine on Host OS
  3. NVIDIA Container Toolkit on Host OS

Implementation of CUDA in Docker containers, image from NVIDIA

Notes

  1. Currently only tested on Host PC with Host OS Ubuntu 20.04 x64_86

Implementation

  1. The fenics-project/docker base image is build. This is an image with a Container OS User Space based on Ubuntu 18.04 x86-64.
  2. The previous image is expanded with an adjusted version of the CUDA 10.1 base image for Ubuntu 18.04 x86_64
  3. The previous image is expanded with an adjusted version of the CUDA 10.1 runtime image for Ubuntu 18.04 x86_64
  4. The previous image is expanded with an adjusted version of the CUDA 10.1 devel image for Ubuntu 18.04 x86_64
  5. The previous image is expanded with an adjusted version of the fenics-project/docker dev-env image, which builds PETSc with CUDA support.
  6. The previous image is expanded with an adjusted version of the fenics-project/docker stable image, which builds fenics.

This now gives us an image with the fenics applications, which is able to utilize the NVIDIA GPU on the Server. A container can be run by the adjusted.

Usage

An adapted version of the fenicsproject helper script is provided in bin/fenicsgpuproject. Place this file in .local/bin to use the container as described in Fenics container quickstart.

Propoperties of Docker image

  • Container OS User Space: Ubuntu 18.04 x64_86
  • CUDA Driver version 10.1
  • PETSc version X.XX --with-cuda
  • fenics version 2019

Authors