Skip to content

Commit 4a35ac0

Browse files
pcaspersjenkins
authored andcommitted
QPR-12005 update docker files
1 parent f1a93ea commit 4a35ac0

14 files changed

Lines changed: 22 additions & 131 deletions

Docker/.env

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
TAG=latest
21
DEBIAN_TAG=11.7
2+
# it's recommended to include CMAKE_BUILD_TYPE in the QL and ORE tags if the latter is not 'Release'
33
QL_TAG=1.30_00d2fced87
4+
ORE_TAG=latest_debug
45
BOOST_TAG=1.78.0
56
BOOST_DIR=1_78_0
6-
NUM_CORES=16
7+
# debug or release
8+
BOOST_VARIANT=debug
9+
# Release, RelWithDebInfo, Debug
10+
CMAKE_BUILD_TYPE=RelWithDebInfo
11+
NUM_CORES=6

Docker/Dockerfile-Boost-Debug

Lines changed: 0 additions & 29 deletions
This file was deleted.

Docker/Dockerfile-ORE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# syntax = nexus3.acadiasoft.net:4445/docker/dockerfile:experimental
22
ARG quantlib_version=${QL_TAG}
3+
ARG cmake_build_type=${CMAKE_BUILD_TYPE}
34
FROM env_quantlib:${quantlib_version}
45

56
MAINTAINER Quaternion Risk Management
@@ -27,7 +28,7 @@ RUN cd /ore \
2728
&& find -regex ".*\.\(sh\|in\|ac\|am\)" -exec dos2unix {} ';' \
2829
&& cp Docker/CMakeLists_ORE.txt CMakeLists.txt \
2930
&& mkdir -p build.ore && cd build.ore \
30-
&& cmake .. -DORE_BUILD_DOC=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-mavx2" -DORE_ENABLE_PARALLEL_UNIT_TEST_RUNNER=ON -DORE_USE_ZLIB=ON
31+
&& cmake .. -DORE_BUILD_DOC=ON -DCMAKE_BUILD_TYPE=${cmake_build_type} -DCMAKE_CXX_FLAGS="-mavx2" -DORE_ENABLE_PARALLEL_UNIT_TEST_RUNNER=ON -DORE_USE_ZLIB=ON
3132

3233
WORKDIR /ore/build.ore
3334
RUN --mount=type=cache,target=/ccache/ make -j ${num_cores} \

Docker/Dockerfile-ORE-App

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG ore_version=latest
22
ARG test_tag=latest
3+
ARG cmake_build_type
34

45
FROM env_ore:${ore_version} as env_ore
56
FROM env_ore_test:${test_tag}

Docker/Dockerfile-ORE-Debug

Lines changed: 0 additions & 35 deletions
This file was deleted.

Docker/Dockerfile-QuantLib

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# syntax = nexus3.acadiasoft.net:4445/docker/dockerfile:experimental
22
ARG boost_version=latest
3-
FROM build_env_boost:${boost_version}
3+
ARG boost_variant=release
4+
FROM build_env_boost_${boost_variant}:${boost_version}
45

56
MAINTAINER Quaternion Risk Management
67
LABEL Description="Build QuantLib and add to the Boost build environment"
78

89
# Argument for number of cores to use while building
910
ARG num_cores
1011

12+
# Argument that chooses cmake build type
13+
ARG cmake_build_type
14+
1115
# Exclusions are performed by .dockerignore
1216
COPY QuantLib /ore/QuantLib
1317

@@ -23,7 +27,7 @@ ENV CCACHE_DIR="/ccache"
2327
RUN cd /ore/QuantLib \
2428
&& find -regex ".*\.\(sh\|in\|ac\|am\)" -exec dos2unix {} ';' \
2529
&& mkdir -p build.ql && cd build.ql \
26-
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_FLAGS="-D BOOST_ENABLE_ASSERT_HANDLER -mavx2" -DQL_ENABLE_SESSIONS=ON -DQL_ENABLE_PARALLEL_UNIT_TEST_RUNNER=ON
30+
&& cmake .. -DCMAKE_BUILD_TYPE=${cmake_build_type} -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_FLAGS="-D BOOST_ENABLE_ASSERT_HANDLER -mavx2" -DQL_ENABLE_SESSIONS=ON -DQL_ENABLE_PARALLEL_UNIT_TEST_RUNNER=ON
2731

2832
WORKDIR /ore/QuantLib/build.ql
2933
RUN --mount=type=cache,target=/ccache/ make -j ${num_cores} \

Docker/Dockerfile-QuantLib-Debug

Lines changed: 0 additions & 25 deletions
This file was deleted.

Docker/docker-compose-boost-debug.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

Docker/docker-compose-boost.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
build_env_boost:
5-
image: build_env_boost:${BOOST_TAG}
5+
image: build_env_boost_${BOOST_VARIANT}:${BOOST_TAG}
66
build:
77
context: .
88
dockerfile: Dockerfile-Boost
@@ -11,3 +11,4 @@ services:
1111
- boost_dir=boost_${BOOST_DIR}
1212
- num_cores=16
1313
- debian_tag=${DEBIAN_TAG}
14+
- boost_variant=${BOOST_VARIANT}

Docker/docker-compose-ore-app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ services:
88
dockerfile: Docker/Dockerfile-ORE-App
99
args:
1010
- ore_version=${ORE_TAG}
11+
- cmake_build_type=${CMAKE_BUILD_TYPE}

0 commit comments

Comments
 (0)