Skip to content

Commit

Permalink
test/docker: add Dockerfile with PerfFlowAspect
Browse files Browse the repository at this point in the history
Problem: Enabling performance profiling of Fluxion requires
setting up PerfFlowAspect, which is not present in the
current setup.

Add a Dockerfile which builds and installs PerfFlowAspect.
  • Loading branch information
tpatki committed Mar 7, 2024
1 parent 8671d56 commit 39a4f53
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/test/docker/bookworm-pfa/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
FROM fluxrm/flux-core:bookworm

ARG USER=flux
ARG UID=1000
USER root

# Install extra buildrequires for flux-sched:
RUN apt-get update
RUN apt-get -qq install -y --no-install-recommends \
libboost-graph-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-regex-dev \
libyaml-cpp-dev \
libedit-dev \
ninja-build \
python3-yaml \
llvm-dev \
libssl-dev \
flex \
bison \
cmake

# Add configured user to image with sudo access:
#
RUN \
if test "$USER" != "flux"; then \
groupadd -g $UID $USER \
&& useradd -g $USER -u $UID -d /home/$USER -m $USER \
&& sh -c "printf \"$USER ALL= NOPASSWD: ALL\\n\" >> /etc/sudoers" \
&& adduser $USER sudo ; \
fi

USER $USER
WORKDIR /home/$USER

# Install PerfFlowAspect
RUN git clone https://github.com/flux-framework/PerfFlowAspect.git PerfFlowAspect
WORKDIR /home/$USER/PerfFlowAspect/src/c
RUN mkdir build-pfa
WORKDIR /home/$USER/PerfFlowAspect/src/c/build-pfa
RUN echo $PWD
RUN export CC="clang-15"
RUN export CXX="clang++-15"
RUN export CFLAGS="-O2 -gdwarf-4"
RUN export CXXFLAGS="-gdwarf-4"
RUN cmake -DCMAKE_CXX_COMPILER="clang++-15" -DPERFFLOWASPECT_WITH_CUDA=OFF \
-DCMAKE_INSTALL_PREFIX=/home/$USER/PerfFlowAspect/src/c/install-pfa ../
RUN make
RUN make install

WORKDIR /home/$USER


0 comments on commit 39a4f53

Please sign in to comment.