-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathsles.Dockerfile
More file actions
46 lines (41 loc) · 1.22 KB
/
sles.Dockerfile
File metadata and controls
46 lines (41 loc) · 1.22 KB
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
# syntax=docker/dockerfile:1.4
ARG VMAJ
ARG VMIN
FROM ghcr.io/oneapi-src/level-zero-linux-compute/sles:${VMAJ}.${VMIN}
SHELL ["/bin/bash", "-e", "-c"]
ARG VMAJ
ARG VMIN
RUN <<EOF
if [ "$VMIN" = "4" ]; then
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 120 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-11 120
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-11 120
elif [ "$VMIN" = "6" ]; then
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 120 \
--slave /usr/bin/g++ g++ /usr/bin/g++-13
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-13 120
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 120
fi
update-alternatives --config gcc
update-alternatives --config c++
update-alternatives --config cc
EOF
# Static libraries for boost are not part of the SLES distribution
RUN <<EOF
git clone --recurse-submodules --branch boost-1.76.0 https://github.com/boostorg/boost.git
cd boost
./bootstrap.sh
./b2 install \
-j 4 \
address-model=64 \
--with-chrono \
--with-log \
--with-program_options \
--with-serialization \
--with-system \
--with-date_time \
--with-timer
cd ..
rm -rf boost
EOF