aboutsummaryrefslogtreecommitdiff
path: root/jammy-arm64-tcwg-base/Dockerfile
blob: 4c939f20be775bfdca853142479f96c0c3185f36 (plain)
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# Auto generated by ./tcwg-base/generate-dockerfiles.sh from tcwg-base/Dockerfile.in. Do not edit.
FROM ubuntu:jammy
# Use bash for better string escaping (on Ubuntu, /bin/sh is dash).
SHELL ["/bin/bash", "-c"]
# Unminimize Ubuntu to install contrib files of git (after package
# update, otherwise unminimize's "apt upgrade" might fail).
RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \
 && echo y | unminimize \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 alien \
 autoconf \
 autogen \
 automake \
 bc \
 bind9-host \
 bison \
 binutils-dev \
 bsd-mailx \
 build-essential \
 byacc \
 ccache \
 ccrypt \
 chrpath \
 clang \
 curl \
 debhelper \
 default-jre \
 dejagnu \
 dh-autoreconf \
 dh-translations \
 distro-info-data \
 emacs \
 fakeroot \
 flex \
 fp-compiler \
 gawk \
 gdc \
 gdb \
 gdbserver \
# gettext is needed according to README-maintainer-mode
 gettext \
 gfortran \
 git \
 # git-annex : is now used to store bmk results in base-artifacts
 git-annex \
 git-filter-repo \
 gm2 \
 # For unknown reason "gnat" defaults to "gnat-10" in Jammy, while all other
 # GCC packages default to "*-11" versions.
 gnat-11 \
 gobjc \
 gobjc++ \
 golang \
 groff \
 guile-3.0 \
 guile-3.0-dev \
 less \
# libc6-dbg is necessary for armhf debugging, but also helps on aarch64.
 libc6-dbg \
 libcc1-0 \
# For building lldb.
 libedit-dev \
 libexpat1-dev \
 libffi-dev \
 libglib2.0-dev \
 libgmp-dev \
# libjpeg is necessary for building jipdate
 libjpeg-dev \
 liblzma-dev \
 libmpc-dev \
 libmpfr-dev \
# We need libncurses5 for ancient clang-3289846 used for renderscript AOSP.
 libncurses5 \
 libncurses5-dev \
 libpixman-1-dev \
 libpython3-dev \
 libreadline-dev \
 libssl-dev \
 libtcnative-1 \
# Our bionic-built llvm releases expect to find this but
# focal installs libtinfo6 instead.
 libtinfo5 \
 libtool \
# For building lldb.
 libxml2-dev \
 llvm \
 locales \
 lzop \
 make \
 moreutils \
 net-tools \
 netcat \
 nfs-kernel-server \
 ninja-build \
 ntp \
 openssh-server \
 pkg-config \
 psmisc \
 python3-dev \
 python3-pip \
 python3-setuptools \
 python3-venv \
 python3-wheel \
 python3-pandas \
 python3-numpy \
 python3-scipy \
# Symlink python to python3 to make upstream "repo", which is downloaded
# by distro's repo, happy. Also needed to run lnt checks on focal.
 python-is-python3 \
# Focal doesn't have "repo" package.  We also symlink python to python3
# below solely to make upstream repo, which is downloaded by distro's repo,
# happy.
 repo \
 rsync \
# sqlite3 is used by lnt test suite
 sqlite3 \
 subversion \
 sudo \
 swig \
# systemtap-sdt-dev allows building glibc with probes, which GDB uses to
# detect shared library events.
 systemtap-sdt-dev \
 tclsh \
 texinfo \
 texlive-fonts-recommended \
 texlive-latex-recommended \
 time \
# tox is used to run lnt test suite
 tox \
 unifdef \
 valgrind \
 vim \
# virtualenv is used for lnt environment
 virtualenv \
 wget \
# xsltproc is needed by GDB in maintainer mode
 xsltproc \
 xz-utils \
 zip \
 zlib1g-dev \
 shellcheck \
# Update tzdata, because some base images have an incorrect file for UTC.
 && DEBIAN_FRONTEND=noninteractive apt-get install --reinstall tzdata \
 && rm -f /etc/ssh/ssh_host_*_key* \
 && apt-get clean \
 && rm -rf \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/*
RUN install -D -p -m0755 /usr/share/doc/git/contrib/workdir/git-new-workdir /usr/local/bin/git-new-workdir \
 && sed -i -e 's:^session *required *pam_loginuid.so:# session required pam_loginuid.so:' /etc/pam.d/sshd \
 && mkdir -p /var/run/sshd \
 && sed -i \
 -e "/.*MaxStartups.*/d" \
 -e "/.*MaxSessions.*/d" /etc/ssh/sshd_config \
 && echo "MaxStartups 256" >> /etc/ssh/sshd_config \
 && echo "MaxSessions 256" >> /etc/ssh/sshd_config \
 && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 \
 && pip3 install git-review \
 && pip3 install psutil \
# Patchworks client for pre-commit testing with "-f yaml" support and
# shyaml tool to parse its output; these are used in jenkins-scripts/pw-*.sh.
 && pip3 install git-pw \
 && pip3 install shyaml \
# For testing lldb.
 && pip3 install pexpect \
 && true
# Install custom jipdate.
# FIXME: Revert to installing from pip, when pull requests from maxim-kuvyrkov
#        are merged https://github.com/Linaro/jipdate/pulls .
RUN git clone -b master https://github.com/maxim-kuvyrkov/jipdate.git /usr/local/jipdate/ \
 && cd /usr/local/jipdate \
 && pip3 install flit \
 && flit build \
 && FLIT_ROOT_INSTALL=1 flit install --symlink
# LLVM requires at least CMake 3.20.0 and we need 3.24 for flang support.
RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-aarch64.sh \
 && chmod +x cmake-3.24.2-linux-aarch64.sh \
 && ./cmake-3.24.2-linux-aarch64.sh --prefix=/usr/local --skip-license
# Configure linux tools for benchmarking support.
#
# We symlink linux tools to supportted "hw_tags":
#   apm_32, apm_64, sq_32, sq_64, tk1_32, tx1_32, tx1_64.
# HW_TAGS represent tested configurations of hardware+kernel+perf that
# work well together.  We create new hw_tag for any variation in hardware,
# kernel, or perf.  This gives us assurance that benchmarking data stored
# under bkp-01.tcwglab:results-<HW_TAG>/ directory has no unexpected variations.
#
# For the initial hw_tags for TK1s and TX1s we can use nice short tk1_32,
# tx1_64, and tx1_32 names, but if we update, say, perf version, we would
# need to add something like tk1_32-lt_5.4 (updating linux-tools to 5.4) or
# tx1_64-k_4.10 (updating kernel to 4.10).
#
# Bionic's linux-tools-4.18 version has proven to work well with TK1s' 3.10 and
# TX1s' 4.4 kernels.  We need to install it in all distro versionss so that we
# use same perf version to generate and process results.
RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
# cpufrequtils is used by our benchmarking scripts, but we should update them to
# use cpupower from linux-tools everywhere instead.
 cpufrequtils \
 linux-tools-common \
 && cat /etc/apt/sources.list | sed -e "s/jammy/bionic/g" \
      > /etc/apt/sources.list.d/bionic.list \
# Import Bionic key
 && apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 \
 && apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 linux-tools-4.18.0-13-generic \
 linux-tools-5.4.0-74-generic \
 linux-tools-5.4.0-80-generic \
 linux-tools-5.4.0-99-generic \
 linux-tools-5.19.0-41-generic \
 && apt-get clean \
 && rm -rf \
 /etc/apt/sources.list.d/bionic.list \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/* \
 && ln -s /usr/lib/linux-tools/4.18.0-13-generic /usr/lib/linux-tools/tk1_32 \
 && ln -s /usr/lib/linux-tools/4.18.0-13-generic /usr/lib/linux-tools/tx1_32 \
 && ln -s /usr/lib/linux-tools/4.18.0-13-generic /usr/lib/linux-tools/tx1_64 \
 && ln -s /usr/lib/linux-tools/5.4.0-74-generic /usr/lib/linux-tools/sq_32 \
 && ln -s /usr/lib/linux-tools/5.4.0-74-generic /usr/lib/linux-tools/sq_64 \
 && ln -s /usr/lib/linux-tools/5.4.0-80-generic /usr/lib/linux-tools/apm_32 \
 && ln -s /usr/lib/linux-tools/5.4.0-80-generic /usr/lib/linux-tools/apm_64 \
 && ln -s /usr/lib/linux-tools/5.4.0-99-generic /usr/lib/linux-tools/fx_32 \
 && ln -s /usr/lib/linux-tools/5.4.0-99-generic /usr/lib/linux-tools/fx_64 \
 && ln -s /usr/lib/linux-tools/5.19.0-41-generic /usr/lib/linux-tools/qc_32 \
 && ln -s /usr/lib/linux-tools/5.19.0-41-generic /usr/lib/linux-tools/qc_64 \
 && true
# Add the latest clang (17.0.6)
# We need this in tcwg-llvmbot images for *-latest-clang bots, and in tcwg-build/tcwg-dev
# images for building LLVM with flang enabled.
RUN \
 clang_ver=clang+llvm-17.0.6-aarch64-linux-gnu \
 # For the 17.0.6 release, the two archives have different formats.
 ext=xz \
 && cd /usr/local \
 && wget --progress=dot:giga https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/$clang_ver.tar.$ext \
 && tar xf $clang_ver.tar.$ext \
 && rm $clang_ver.tar.$ext
# Add libpgmath, which is used by flang
RUN git clone https://github.com/rovka/libpgmath-binaries.git \
 && mv libpgmath-binaries/* /usr/local/lib/ \
 && rm -rf libpgmath-binaries
# Precommit testing for GNU projects requires autoconf-2.69 and
# automake-1.15.1.  Install them in custom paths to avoid confusing
# other tools that make use of the system versions.
# README-maintainer-mode in these projects also mentions libtool-2.2.6
# and gettext-0.16.1, but there is no tarball available for these
# versions.  In addition, some files have been regenerated using
# libtool-2.2.7a which is not available either.  Build succeeds in
# with --enable-maintainer-mode and the system versions of libtool and
# gettext, so rely on them.
RUN autoconf_version=2.69 autoconf_ver=autoconf-${autoconf_version}  \
 && cd /usr/local \
 && wget https://ftp.gnu.org/gnu/autoconf/${autoconf_ver}.tar.xz \
 && cd /tmp \
 && tar xf /usr/local/${autoconf_ver}.tar.xz \
 && cd ${autoconf_ver} \
 && mkdir build \
 && cd build \
 && ../configure --prefix=/usr/local/${autoconf_ver} \
 && make install \
 && cd /usr/local/${autoconf_ver}/bin \
 && for f in autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames; do \
      ln -sv $f $f-${autoconf_version} ; \
    done \
 && rm -f /usr/local/${autoconf_ver}.tar.xz \
 && automake_version=1.15.1 automake_ver=automake-${automake_version} \
 && cd /usr/local \
 && wget https://ftp.gnu.org/gnu/automake/${automake_ver}.tar.xz \
 && cd /tmp \
 && tar xf /usr/local/${automake_ver}.tar.xz \
 && cd ${automake_ver} \
 && mkdir build \
 && cd build \
 && ../configure --prefix=/usr/local/${automake_ver} \
 && make install \
 && cd /usr/local/${automake_ver}/bin \
 && for f in aclocal automake; do \
      ln -sv $f $f-${automake_version} ; \
    done \
 && rm -f /usr/local/${automake_ver}.tar.xz \
 && rm -rf /tmp/${autoconf_ver} /tmp/${automake_ver}
COPY home-data/ /home-data/
COPY install-gcc-latest.sh new-user.sh nvidia-power-cycle.sh nvidia-serial.sh \
  /usr/local/bin/
RUN \
 while read line; do \
   new-user.sh --group $(echo "$line" | cut -d: -f 1,3); \
 done < <(grep -v ":x:x:" /home-data/group)
# Create directories required for X11.  We use X11 in tcwg-x2go images and,
# sometimes, in tcwg-dev images.
# We need to create these before "VOLUME /tmp" directive, since after
# the directive stuff from /tmp won't make it into the image.
RUN mkdir -p /tmp/.X11-unix /tmp/.ICE-unix \
 && chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix
# We use ssh multiplexing, which creates sockets in /tmp.  Overlayfs,
# which docker is using, can't host sockets, so we use a scratch mount
# for /tmp.  This requires that we add --rm option to "docker run"
# invocations (e.g., mark "Remove volumes" checkbox in docker plugin) to
# cleanup host directories used for the scratch mounts.
VOLUME /tmp
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
# This is a dummy comment to trigger a base image rebuild.
# checksum: ff825fc7d2c78670adfaff39d0d05a90