-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
204 lines (195 loc) · 7.48 KB
/
docker-compose.yml
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
42
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#
# Usage:
# ------
#
# This docker compose file parameterizes build configurations using environment
# variables from the host. The default values for the build configuration
# variables are set in `.env`.
#
# Variables:
# ARCH={amd64, arm64v8, ...}
# COMPILER_TYPE={gnu, clang, intel, nvidia}
# COMPILER={gcc-8, gcc-9, gcc-10,
# clang-5.0, clang-6.0, clang-7, clang-8,
# clang-9, clang-10,
# icc-18, icc-19,
# nvcc-11.2, nvcc-11.4, nvcc-12}
# REPO=lifflander1/checkpoint
# UBUNTU={18.04, 20.04}
# ULIMIT_CORE=0
#
# DARMA/checkpoint Configuration Variables:
# MAGISTRATE_TESTS=1 # Enable checkpoint tests
# MAGISTRATE_EXAMPLES=1 # Enable checkpoint examples
# MAGISTRATE_MPI=1 # Enable checkpoint MPI tests
# MAGISTRATE_WARNINGS_AS_ERRORS=0 # Treat warnings as errors in compilation
# MAGISTRATE_ASAN=0 # Enable address sanitizer in build
# MAGISTRATE_UBSAN=0 # Enable undefined behavior sanitizer in build
# MAGISTRATE_DOCS=0 # Enable doxygen build
# MAGISTRATE_SERIALIZATION_ERROR_CHECKING=0 # Enable extensive serialization error checking
# BUILD_TYPE=release # CMake build type
# CODE_COVERAGE=0 # Enable generation of code coverage reports
#
# In order to run in the container, there are two stages. First, one must build
# or pull the base container with the variables exported (or using the defaults
# in `checkpoint/.env` that configure it:
#
# For a non-interactive build with gcc-8, since gnu is the default compiler
# type, one may do the following:
#
# $ COMPILER=gcc-8 docker-compose pull ubuntu-cpp
# $ COMPILER=gcc-8 docker-compose run ubuntu-cpp
#
# Need verision >= 3.5 for the features in use
version: '3.5'
# Named volumes must be predefined according the docker compose rules. Many
# combinations have already been added, but if a needed configuration is missing
# add it to this list.
volumes:
amd64-ubuntu-18.04-clang-5.0-cache:
amd64-ubuntu-18.04-clang-6.0-cache:
amd64-ubuntu-18.04-clang-7-cache:
amd64-ubuntu-18.04-clang-8-cache:
amd64-ubuntu-18.04-clang-9-cache:
amd64-ubuntu-20.04-clang-10-cache:
amd64-ubuntu-18.04-gcc-8-cache:
amd64-ubuntu-20.04-gcc-8-cache:
amd64-ubuntu-20.04-gcc-9-cache:
amd64-ubuntu-20.04-gcc-10-cache:
amd64-ubuntu-18.04-icc-18-cache:
amd64-ubuntu-18.04-icc-19-cache:
amd64-ubuntu-20.04-nvcc-11.2-cache:
amd64-ubuntu-20.04-nvcc-11.4-cache:
amd64-ubuntu-20.04-nvcc-12-cache:
arm64v8-ubuntu-18.04-clang-5.0-cache:
arm64v8-ubuntu-18.04-clang-6.0-cache:
arm64v8-ubuntu-18.04-clang-7-cache:
arm64v8-ubuntu-18.04-clang-8-cache:
arm64v8-ubuntu-18.04-clang-9-cache:
arm64v8-ubuntu-20.04-clang-10-cache:
arm64v8-ubuntu-18.04-gcc-8-cache:
arm64v8-ubuntu-20.04-gcc-8-cache:
arm64v8-ubuntu-20.04-gcc-9-cache:
arm64v8-ubuntu-20.04-gcc-10-cache:
arm64v8-ubuntu-18.04-icc-18-cache:
arm64v8-ubuntu-18.04-icc-19-cache:
arm64v8-ubuntu-20.04-nvcc-11.2-cache:
arm64v8-ubuntu-20.04-nvcc-11.4-cache:
arm64v8-ubuntu-20.04-nvcc-12-cache:
# Define basic rules for ccache used across multiple services. The beauty of
# docker compose with cached volumes is that similarily configured builds will
# reuse a ccache volume making build speeds much faster than a fresh build each
# time.
x-ccache: &ccache
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 5
CCACHE_MAXSIZE: 700M
CCACHE_DIR: /build/ccache
# Define rules for CheckPoint configuration options across various services
x-checkpointopts: &checkpointopts
MAGISTRATE_TESTS_ENABLED: ${MAGISTRATE_TESTS:-1}
MAGISTRATE_EXAMPLES_ENABLED: ${MAGISTRATE_EXAMPLES:-1}
MAGISTRATE_MPI_ENABLED: ${MAGISTRATE_MPI:-1}
MAGISTRATE_ASAN_ENABLED: ${MAGISTRATE_ASAN:-0}
MAGISTRATE_UBSAN_ENABLED: ${MAGISTRATE_UBSAN:-0}
MAGISTRATE_WARNINGS_AS_ERRORS: ${MAGISTRATE_WARNINGS_AS_ERRORS:-0}
MAGISTRATE_DOXYGEN_ENABLED: ${MAGISTRATE_DOCS:-0}
CMAKE_BUILD_TYPE: ${BUILD_TYPE:-release}
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED: ${MAGISTRATE_SERIALIZATION_ERROR_CHECKING:-0}
CODE_COVERAGE: ${CODE_COVERAGE:-0}
https_proxy: ${PROXY-}
http_proxy: ${PROXY-}
CODECOV_TOKEN: ${CODECOV_TOKEN:-}
services:
##############################################################################
# C++ builds of Checkpoint on linux platform from container baseline
# Ubuntu gcc-8 debug build:
# docker-compose run -e CMAKE_BUILD_TYPE=debug ubuntu-cpp
ubuntu-cpp:
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
build:
context: .
target: base
dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-cpp.dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
args: &default-args
arch: ${ARCH}
proxy: ${PROXY}
compiler: ${COMPILER}
distro: ${UBUNTU}
ulimits: &ulimits
core: ${ULIMIT_CORE}
environment:
<<: [*ccache, *checkpointopts]
volumes: &ubuntu-volumes
- .:/checkpoint:delegated
- ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cache:/build:delegated
command: &vt-cpp-command >
/bin/bash -c "
/checkpoint/ci/build_cpp.sh /checkpoint /build &&
/checkpoint/ci/test_cpp.sh /checkpoint /build"
ubuntu-cpp-vt:
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
build:
context: .
target: base
dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-cpp.dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
args: *default-args
ulimits: *ulimits
environment:
<<: [*ccache, *checkpointopts]
volumes: *ubuntu-volumes
command: &build-against-vt-cpp-command >
/bin/bash -c "
/checkpoint/ci/build_against_vt.sh /vt /build /checkpoint &&
/vt/ci/test_cpp.sh /vt /build"
##############################################################################
# Interactive C++ setup of Checkpoint on ubuntu platform from container
# baseline.
#
# After running:
# docker-compose run ubuntu-cpp-interactive
#
# You will get a command line where you can run the build command:
# $ /checkpoint/ci/build_cpp.sh /checkpoint /build
# $ /checkpoint/ci/test_cpp.sh /checkpoint /build
ubuntu-cpp-interactive:
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
build:
context: .
target: base
dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-cpp.dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
args: *default-args
ulimits: *ulimits
environment:
<<: [*ccache, *checkpointopts]
volumes: *ubuntu-volumes
##############################################################################
# Build documentation for Checkpoint in the container on ubuntu platform from
# container baseline.
ubuntu-docs:
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-docs
build:
context: .
target: base
dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp
args:
<<: *default-args
token: ${TOKEN}
ulimits: *ulimits
environment:
<<: *ccache
MAGISTRATE_DOXYGEN_ENABLED: 1
CMAKE_BUILD_TYPE: ${BUILD_TYPE:-release}
volumes: *ubuntu-volumes
command: &docs-cpp-command >
/bin/bash -c "
/checkpoint/ci/build_cpp.sh /checkpoint /build ${TOKEN}"