ClickHouse/docker/test/performance-comparison/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
2.3 KiB
Docker
Raw Normal View History

2021-09-06 11:33:39 +00:00
# docker build -t clickhouse/performance-comparison .
FROM ubuntu:20.04
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
2020-02-03 14:19:41 +00:00
ENV LANG=C.UTF-8
2022-03-13 01:03:06 +00:00
ENV TZ=Europe/Moscow
2020-01-16 19:39:07 +00:00
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2019-12-26 21:33:10 +00:00
RUN apt-get update \
2020-01-14 19:05:58 +00:00
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
2020-02-12 16:09:46 +00:00
bash \
curl \
2020-10-22 12:52:43 +00:00
dmidecode \
2020-02-12 16:09:46 +00:00
g++ \
2020-04-22 19:41:40 +00:00
gdb \
2020-02-12 16:09:46 +00:00
git \
2020-06-25 20:19:27 +00:00
gnuplot \
imagemagick \
2020-02-17 19:32:40 +00:00
libc6-dbg \
2020-02-12 16:09:46 +00:00
moreutils \
ncdu \
2020-07-22 13:18:57 +00:00
numactl \
2020-02-12 16:09:46 +00:00
p7zip-full \
2020-02-27 19:43:43 +00:00
parallel \
2020-02-12 16:09:46 +00:00
psmisc \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
2020-02-14 12:55:47 +00:00
rsync \
2020-02-12 16:09:46 +00:00
tree \
tzdata \
vim \
wget \
&& pip3 --no-cache-dir install 'clickhouse-driver==0.2.1' scipy \
2019-12-26 21:33:10 +00:00
&& apt-get purge --yes python3-dev g++ \
&& apt-get autoremove --yes \
2020-01-10 14:06:07 +00:00
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY * /
2020-10-22 12:52:43 +00:00
# Bind everything to one NUMA node, if there's more than one. Theoretically the
# node #0 should be less stable because of system interruptions. We bind
# randomly to node 1 or 0 to gather some statistics on that. We have to bind
# both servers and the tmpfs on which the database is stored. How to do it
# through Yandex Sandbox API is unclear, but by default tmpfs uses
# 'process allocation policy', not sure which process but hopefully the one that
# writes to it, so just bind the downloader script as well. We could also try to
# remount it with proper options in Sandbox task.
2020-09-30 11:32:49 +00:00
# https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt
2020-10-22 16:42:31 +00:00
# Double-escaped backslashes are a tribute to the engineering wonder of docker --
# it gives '/bin/sh: 1: [bash,: not found' otherwise.
CMD ["bash", "-c", "node=$((RANDOM % $(numactl --hardware | sed -n 's/^.*available:\\(.*\\)nodes.*$/\\1/p'))); echo Will bind to NUMA node $node; numactl --cpunodebind=$node --membind=$node /entrypoint.sh"]
2019-12-26 21:33:10 +00:00
2021-09-06 11:33:39 +00:00
# docker run --network=host --volume <workspace>:/workspace --volume=<output>:/output -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/performance-comparison