Dockerfile 3.68 KB
Newer Older
Michele Compostella's avatar
Michele Compostella committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#####################################################################################################
## Copyright (C) 2020 Udo von Toussaint, F. J. Dominguez-Gutierrez, Markus Rampp, Michele Compostella
##              Max-Planck-Institut für Plasmaphysik, Boltzmannstrasse 2, 85748 Garching, Germany
##              Max-Planck Computing and Data Facility, Giessenbachstrasse 2, 85748 Garching, Germany
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
#####################################################################################################
##
## General Notes:
## Docker file for Fingerprinting and Visualizing defects in damaged crystal structures
## Version: 1.0
## This software provides a workflow for fingerprinting and visualizing defects in damaged crystal 
## structures. The theoretical background is presented in: paper_ID
##
#####################################################################################################

# Importing Ubuntu image
FROM ubuntu:18.04

# Build arguments
ARG PREFIX

# Environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV QUIP_ARCH linux_x86_64_gfortran
ENV QUIP_STRUCTS_DIR $PREFIX/QUIP/structs
ENV QUIP_INSTALLDIR $PREFIX/QUIP/bin
Michele Compostella's avatar
Michele Compostella committed
42
USER $USER
Michele Compostella's avatar
Michele Compostella committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
WORKDIR /root/

# Updating distro
RUN \
  apt-get update && \
  apt-get upgrade -y

# Installing basic packages
RUN \
  apt-get install -y apt-utils unzip git cpio && \
  apt-get install -y gcc gfortran libblas-dev liblapack-dev python python-pip python3 python3-pip ffmpeg imagemagick && \
  apt-get install -y libsm6 libgl1 libgl1-mesa-dri libgl1-mesa-glx libpcre3-dev libxt6 && \
  apt-get autoclean && \
  apt-get autoremove

# Copying software source files
COPY ./software /tmp/software

# Creating installation folder
RUN mkdir -p $PREFIX

# Installing Python3 modules
RUN pip3 install numpy matplotlib vtk 
RUN pip3 install mayavi

# Installing QUIP
RUN \
  tar xvzf /tmp/software/QUIP.tar.gz -C $PREFIX/. && \
  cd $PREFIX/QUIP/ && \
  tar xvzf /tmp/software/GAP.tar.gz -C $PREFIX/QUIP/src/. && \
  (echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo y ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ) | make config && \
  make && \
  make install 

# Installing VORO++
RUN \
  mkdir -p $PREFIX/voro++ && \
  tar xvzf /tmp/software/voro++-0.4.6.tar.gz -C $PREFIX/voro++ --strip-components 1 && \
  cd $PREFIX/voro++/ && \
  sed -i "21s|.*|PREFIX=$PREFIX/voro++|" ./config.mk && \
  make && \
  make install

# Installing KDTREE2
RUN \
  tar xvzf /tmp/software/kdtree2.tar.gz -C $PREFIX/. && \
  cd $PREFIX/kdtree2/ && \
  gfortran -c kdtree2.f90 && \
  gfortran -o kdtree2_iaea_v03.x kdtree2_iaea_v03.f90 kdtree2.o

# Installing VisIt
RUN \
  mkdir -p $PREFIX/visit/ && \
  cd /tmp/software/ && \
  chmod 755 /tmp/software/visit-install2_13_3 && \
  (echo 1) | bash ./visit-install2_13_3 2.13.3 linux-x86_64-ubuntu18-wmesa $PREFIX/visit/

# Removing installation packages
RUN rm -rf /tmp/software/

# Copying sample files
COPY ./sample /root/sample

# Run bash when the container launches
CMD ["/bin/bash"]