-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/docker: add Dockerfile with PerfFlowAspect
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
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|