-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathDockerfile
66 lines (54 loc) · 1.89 KB
/
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
FROM ubuntu:noble AS builder
ARG AERON_VERSION_SELECTOR="--aeron-git-tag 1.44.1"
ENV BENCHMARKS_PATH=/opt/aeron-benchmarks
RUN apt-get update -y &&\
apt-get install -y \
openjdk-17-jdk-headless \
git \
cmake \
wget \
curl \
unzip \
build-essential &&\
wget -q https://services.gradle.org/distributions/gradle-8.8-bin.zip -O /tmp/gradle.zip &&\
unzip -d /opt /tmp/gradle.zip
ENV PATH=${PATH};/opt/gradle-8.8/bin
COPY . /tmp/benchmark-build
WORKDIR /tmp/benchmark-build
RUN ./cppbuild/cppbuild ${AERON_VERSION_SELECTOR} &&\
cd cppbuild/Release/aeron-prefix/src/aeron &&\
./cppbuild/cppbuild --package --no-tests
RUN --mount=type=cache,target=/root/.gradle \
--mount=type=cache,target=/home/gradle/.gradle \
--mount=type=cache,target=/tmp/benchmark-build/.gradle \
export CDRIVER_PACKAGE="$(find cppbuild/Release/aeron-prefix/src/aeron/cppbuild/Release -maxdepth 1 -name 'aeron-*-Linux.tar.gz')" &&\
./gradlew --no-daemon -i clean deployTar -Paeron.cdriver.package="${CDRIVER_PACKAGE}"
RUN mkdir -p ${BENCHMARKS_PATH} &&\
tar -C ${BENCHMARKS_PATH} -xf /tmp/benchmark-build/build/distributions/benchmarks.tar
FROM ubuntu:noble AS runner
RUN apt-get update && \
apt-get install -y \
tar \
openjdk-17-jdk-headless \
gzip \
iproute2 \
bind9-utils \
bind9-host \
sockperf \
irqbalance \
jq \
lsb-release \
python3-pip \
curl \
pipx \
numactl \
hwloc && \
pip install --break-system-packages hdr-plot && \
pip install --break-system-packages awscli
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
ENV BENCHMARKS_PATH=/opt/aeron-benchmarks
COPY --from=builder ${BENCHMARKS_PATH} ${BENCHMARKS_PATH}
# The media driver packaging format does not match what the benchmarks expects
# Manually fix this bit up.
RUN ln -s ${BENCHMARKS_PATH}/bin/aeronmd ${BENCHMARKS_PATH}/scripts/aeron/aeronmd
WORKDIR ${BENCHMARKS_PATH}/scripts