-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathubuntu-nvidia-cpp.dockerfile
120 lines (100 loc) · 3.1 KB
/
ubuntu-nvidia-cpp.dockerfile
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
ARG compiler=11.0.3
ARG arch=amd64
# Works with 20.04 and 22.04
ARG ubuntu=20.04
FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} as base
ARG host_compiler=gcc-9
ARG proxy=""
ENV https_proxy=${proxy} \
http_proxy=${proxy}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y software-properties-common --no-install-recommends && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt remove -y software-properties-common && \
apt-get install -y --no-install-recommends \
ca-certificates \
g++-$(echo ${host_compiler} | cut -d- -f2) \
curl \
less \
git \
wget \
zlib1g \
zlib1g-dev \
ninja-build \
gnupg \
make-guile \
libomp5 \
libunwind-dev \
valgrind \
ccache && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV CC=gcc \
CXX=g++
ARG arch
COPY ./ci/deps/cmake.sh cmake.sh
RUN ./cmake.sh 3.23.4 ${arch}
ENV PATH=/cmake/bin/:$PATH
ENV LESSCHARSET=utf-8
COPY ./ci/deps/mpich.sh mpich.sh
RUN ./mpich.sh 3.3.2 -j4
ARG external_fmt
COPY ./ci/deps/fmt.sh fmt.sh
RUN if test ${external_fmt} -eq 1; then \
chmod +x ./fmt.sh && \
./fmt.sh 7.1.3 -j4; \
fi
RUN mkdir -p /nvcc_wrapper/build && \
wget https://raw.githubusercontent.com/kokkos/kokkos/master/bin/nvcc_wrapper -P /nvcc_wrapper/build && \
chmod +x /nvcc_wrapper/build/nvcc_wrapper
ENV MPI_EXTRA_FLAGS="" \
HOST_COMPILER=${host_compiler} \
PATH=/usr/lib/ccache/:/nvcc_wrapper/build:$PATH \
CXX=nvcc_wrapper
FROM base as build
COPY . /vt
ARG VT_LB_ENABLED
ARG VT_TRACE_ENABLED
ARG VT_TRACE_RUNTIME_ENABLED
ARG VT_MIMALLOC_ENABLED
ARG VT_DOXYGEN_ENABLED
ARG VT_ASAN_ENABLED
ARG VT_UBSAN_ENABLED
ARG VT_WERROR_ENABLED
ARG VT_POOL_ENABLED
ARG VT_PRODUCTION_BUILD_ENABLED
ARG CMAKE_BUILD_TYPE
ARG VT_EXTENDED_TESTS_ENABLED
ARG VT_FCONTEXT_ENABLED
ARG VT_NO_COLOR_ENABLED
ARG BUILD_SHARED_LIBS
ARG CMAKE_CXX_STANDARD
ARG VT_DEBUG_VERBOSE
ARG VT_CI_BUILD
ENV VT_LB_ENABLED=${VT_LB_ENABLED} \
VT_TRACE_ENABLED=${VT_TRACE_ENABLED} \
VT_MIMALLOC_ENABLED=${VT_MIMALLOC_ENABLED} \
VT_DOXYGEN_ENABLED=${VT_DOXYGEN_ENABLED} \
VT_TRACE_RUNTIME_ENABLED=${VT_TRACE_RUNTIME} \
VT_ASAN_ENABLED=${VT_ASAN_ENABLED} \
VT_UBSAN_ENABLED=${VT_UBSAN_ENABLED} \
VT_WERROR_ENABLED=${VT_WERROR_ENABLED} \
VT_POOL_ENABLED=${VT_POOL_ENABLED} \
VT_EXTENDED_TESTS_ENABLED=${VT_EXTENDED_TESTS_ENABLED} \
VT_UNITY_BUILD_ENABLED=${VT_UNITY_BUILD_ENABLED} \
VT_PRODUCTION_BUILD_ENABLED=${VT_PRODUCTION_BUILD_ENABLED} \
VT_FCONTEXT_ENABLED=${VT_FCONTEXT_ENABLED} \
VT_DIAGNOSTICS_ENABLED=${VT_DIAGNOSTICS_ENABLED} \
VT_DIAGNOSTICS_RUNTIME_ENABLED=${VT_DIAGNOSTICS_RUNTIME_ENABLED} \
VT_NO_COLOR_ENABLED=${VT_NO_COLOR_ENABLED} \
CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} \
BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
VT_DEBUG_VERBOSE=${VT_DEBUG_VERBOSE} \
VT_CI_BUILD=${VT_CI_BUILD}
RUN /vt/ci/build_cpp.sh /vt /build
FROM build as test
RUN /vt/ci/test_cpp.sh /vt /build
RUN /vt/ci/build_vt_sample.sh /vt /build