Skip to content

Commit

Permalink
test/docker: Add bookworm Dockerfile with PFA installation steps. Add…
Browse files Browse the repository at this point in the history
… --progress=plain for testing
  • Loading branch information
tpatki committed Mar 7, 2024
1 parent 8671d56 commit 4ee922d
Show file tree
Hide file tree
Showing 2 changed files with 55 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


1 change: 1 addition & 0 deletions src/test/docker/docker-run-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ checks_group "Building image $IMAGE for user $USER $(id -u) group=$(id -g)" \
${PLATFORM} \
${NO_CACHE} \
${QUIET} \
--progress=plain \
--build-arg BASE_IMAGE=$IMAGE \
--build-arg IMAGESRC="$BASE_DOCKER_REPO:$IMAGE" \
--build-arg USER=$USER \
Expand Down

0 comments on commit 4ee922d

Please sign in to comment.