Docker Coremark with multi-platform support
10K+
CoreMark is a tiny executable that is compiled with the number of threads/forks to run in parallel to benchmark multicore CPUs. It is unfortunate that it is not a parameter that you could pass to a compiled executable.
That means it is not entirely straightforward to create a Docker container that would detect the number of cores available and just run the CoreMark binary that was built into the container. Instead, we need to build the binary after launching the container.
Full source code to build this container is available at https://github.com/smanx/docker-coremark.
Run the container and watch the output. It should take less than a minute.
docker run --rm smanx/docker-coremark
The container is stopped after the benchmark is finished. The end of the output looks like this:
------------------------------------------------------
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 138206.388206 / GCC13.2.1 20231014 -O2 -DMULTITHREAD=6 -DUSE_FORK -DPERFORMANCE_RUN=1 -lrt / Heap / 6:Fork
It shows the CoreMark self-test was successful. Then it shows the benchmark result of 138206 points, followed by extra information about the compiler and its options. In the example above, the GCC version was 13.2.1, and the benchmark was compiled for 6 cores.
Content type
Image
Digest
sha256:20e26d5a7…
Size
86.7 MB
Last updated
7 months ago
docker pull smanx/docker-coremark