forked from daanx/mimalloc-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (50 loc) · 2.02 KB
/
Dockerfile
File metadata and controls
62 lines (50 loc) · 2.02 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG platform=ubuntu
FROM ubuntu:24.04 AS ubuntu
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential git gpg \
g++ clang lld llvm-dev unzip dos2unix linuxinfo bc libgmp-dev wget \
cmake python3 ruby ninja-build libtool autoconf sed ghostscript \
time curl automake libatomic1 libgflags-dev libsnappy-dev \
zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libreadline-dev \
pkg-config gawk util-linux
# Install bazel
RUN apt-get install -y --no-install-recommends apt-transport-https curl gnupg
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
RUN mv bazel.gpg /etc/apt/trusted.gpg.d/bazel.gpg
RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" > /etc/apt/sources.list.d/bazel.list
RUN apt-get update && apt-get install bazel
FROM fedora:latest AS fedora
RUN dnf -y --quiet --nodocs install gcc-c++ clang lld llvm-devel unzip \
dos2unix bc gmp-devel wget gawk cmake python3 ruby ninja-build libtool \
autoconf git patch time sed ghostscript libatomic libstdc++ which \
gflags-devel xz readline-devel snappy-devel
RUN dnf -y --quiet copr enable ohadm/bazel
RUN dnf -y --quiet --nodocs install bazel8
FROM alpine:latest AS alpine
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update
RUN apk add --no-cache bash
RUN apk add -q clang lld unzip dos2unix bc gmp-dev wget cmake python3 \
automake gawk samurai libtool git build-base linux-headers autoconf \
util-linux sed ghostscript libatomic gflags-dev readline-dev snappy-dev
RUN apk add -q bazel@testing
FROM ${platform} AS bench-env
# Pull mimalloc-bench
RUN mkdir -p /mimalloc-bench
COPY . /mimalloc-bench
WORKDIR /mimalloc-bench
RUN make benchmarks
RUN make redis
RUN make rocksdb
RUN make lean
RUN make lua
RUN make linux
FROM bench-env AS benchmark
WORKDIR /mimalloc-bench
ARG allocator=mi
ARG benchs=cfrac
ARG repeats=1
RUN make $allocator
# Run benchmarks
WORKDIR /mimalloc-bench/out/bench
RUN ../../bench.sh $allocator $benchs -r=$repeats