PRISMS-PF Manual
Loading...
Searching...
No Matches
Installing with Docker

As mentioned in the Installation page, Docker is potentially the easiest way to install PRISMS-PF. However, it is not performant and unsuitable for large simulations. We'll get into those reasons with a brief introduction to Docker.

Introduction to Docker

Docker is a platform that allows you to run applications in containers. What are containers? Containers are typically stripped down versions of virtual machines that allow you to run an application in an isolated and reproducible environment. This custom environment is defined by a Dockerfile, which is a text file that contains all the instructions to build the container image. The image can then be run on any machine that has Docker installed, regardless of the underlying operating system.

Importantly for PRISMS-PF, Docker allows you to run our software without needing to install any dependencies. All you have to do is download the Docker image! Depending on your operating system and the difference (if any) between the your hardware and the emulated hardware, the running of a Docker image may add some overhead, which will slow down your simulations. Additionally, with the Docker image, you're stuck with the image we provide. If you want to change the compiler, the configuration of dependencies, or any other things, you should consider Installing from Source instead. If you would like to learn more about Docker, here is a nice resource.

Installation with Docker

To install PRISMS-PF with Docker, you will need to have Docker installed on your machine. You can find instructions for installing Docker on the official Docker website.

After you have installed Docker, find a working directory where we can put your files. This is where we will clone PRISMS-PF so you can interact with the files and applications there.

mkdir ~/prisms_pf_docker
git clone https://github.com/prisms-center/phaseField.git

Next, we will pull the docker image with

docker pull prismspf/prismspf:latest

Finally, we will launch an interactive container with

docker run -ti -v
~/prisms_pf_docker/phaseField/applications:/home/dealii/phaseField/applications
prismspf/prismspf:latest
Definition vectorized_operations.h:15

This will link your local applications directory (the one in prisms_workspace) to the one in the Docker image. If you plan to modify the core library, you should link one directory higher to preserve your changes. In other words,

docker run -ti -v
~/prisms_pf_docker/phaseField:/home/dealii/phaseField prismspf/prismspf:latest

You can then run the applications in the container as you would normally. For example, to run the allen_cahn_explicit application, you can use the following commands:

cd allen_cahn_explicit
cmake .
make
mpirun -n 1 ./main