Skip to content

Commit 6a2a535

Browse files
misc: Add LIKWID to Dockerfile.cpu and ncu-report to Dockerfile.gpu (#3116)
* docker: Supply profiler dependencies in base images * docker: Keep LIKWID in the CPU base * docker: Install LIKWID after OpenMPI * docker: Configure LIKWID version and opt prefix
1 parent 1eb54aa commit 6a2a535

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎docker/Dockerfile.cpu‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ RUN cd /tmp && mkdir openmpi && \
5353
ENV PATH=${PATH}:/opt/openmpi/bin
5454
ENV LD_LIBRARY_PATH=/opt/openmpi/lib
5555

56+
# LIKWID is used by DevitoProfiler to measure hardware counters on CPU backends
57+
ARG LIKWID_VERSION=5.5.2
58+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
59+
RUN curl -fsSL https://github.com/RRZE-HPC/likwid/archive/refs/tags/v${LIKWID_VERSION}.tar.gz \
60+
| tar -xz -C /tmp && cd /tmp/likwid-${LIKWID_VERSION} && \
61+
printf '\nPREFIX=/opt/likwid\nACCESSMODE=perf_event\nBUILDAPPDAEMON=false\n' >> config.mk && \
62+
if [ "$(uname -m)" = aarch64 ]; then \
63+
echo 'COMPILER=GCCARMv8' >> config.mk; fi && \
64+
make -j "$(nproc)" && make install && \
65+
install -Dm644 COPYING /opt/likwid/share/doc/likwid/COPYING && \
66+
rm -rf /tmp/likwid-${LIKWID_VERSION}
67+
68+
ENV PATH=/opt/likwid/bin:${PATH}
69+
ENV LD_LIBRARY_PATH=/opt/likwid/lib:${LD_LIBRARY_PATH}
70+
5671
# Cleanup
5772
RUN apt-get clean && apt-get autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
5873

‎docker/Dockerfile.nvidia‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ RUN python3 -m venv /venv && \
145145
/venv/bin/pip install --no-cache-dir --upgrade pip && \
146146
/venv/bin/pip install --no-cache-dir -r https://raw.githubusercontent.com/devitocodes/devito/main/requirements-nvidia.txt && \
147147
# Install jupyter and setup nvidia configs.
148-
/venv/bin/pip install --no-cache-dir jupyter && \
148+
/venv/bin/pip install --no-cache-dir jupyter ncu-report && \
149149
/venv/bin/jupyter server extension enable dask_labextension && \
150150
rm -rf ~/.cache/pip
151151

0 commit comments

Comments
 (0)