-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathDockerfile.base
91 lines (82 loc) · 3.86 KB
/
Dockerfile.base
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
# Copyright (C) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
ARG CUSTOM_FROM
FROM $CUSTOM_FROM
LABEL maintainer="HE Toolkit https://github.com/intel/he-toolkit"
# Proxies, user configured
ARG http_proxy
ARG https_proxy
ARG socks_proxy
ARG ftp_proxy
ARG no_proxy
ARG TZ=UTC
ARG DEBIAN_FRONTEND=noninteractive
ENV http_proxy=$http_proxy \
https_proxy=$https_proxy \
socks_proxy=$socks_proxy \
ftp_proxy=$ftp_proxy \
no_proxy=$no_proxy
RUN apt update && \
apt -y dist-upgrade && \
apt install -y apt-utils \
autoconf \
build-essential \
byobu \
clang-14 \
clang-format-14 \
cmake \
curl \
file \
g++-11 \
gcc-11 \
git \
htop \
jq \
libgmp-dev \
libomp-dev \
libterm-readline-gnu-perl \
m4 \
man \
--no-install-recommends tzdata \
patchelf \
# Workaround for CVE-2023-5752 will install upstream pip as user
# python3-pip \
python-is-python3 \
software-properties-common \
sudo \
unzip \
vim \
virtualenv \
wget \
xz-utils && \
apt autoremove -y && \
apt autoclean -y && \
rm -rf /var/lib/apt/lists/*
# Update alternatives clean up cpp configuration
RUN update-alternatives --remove-all cpp
# Update alternatives for GCC-11
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \
--slave /usr/bin/cpp cpp /usr/bin/cpp-11 \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \
--slave /usr/bin/lto-dump lto-dump /usr/bin/lto-dump-11
# Set GCC-11 as default
RUN update-alternatives --set gcc /usr/bin/gcc-11
# Update alternatives for CLANG-14
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 14 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-14 \
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-14 \
--slave /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-14 \
--slave /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-14
# Set CLANG-14 as default
RUN update-alternatives --set clang /usr/bin/clang-14
# Set timezone to UTC \
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata
CMD /bin/bash