Last active
November 7, 2022 17:54
-
-
Save bebosudo/f95acd386e24b472a5471162698f46bd to your computer and use it in GitHub Desktop.
Multi-stage dockerfile to build darshan-util: 'docker pull docker.io/bebosudo/darshan-util' (https://hub.docker.com/r/bebosudo/darshan-util)
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
# darshan-util | |
# http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html | |
# | |
# This container file collects all dependencies required to run the analysis | |
# tools on darshan log files. | |
# To build darshan-util we use a multi-stage build: the first FROM builds the | |
# program, while the second copies only the final files into it. | |
# The first image is discarded and we only keep the second image with the | |
# final executables. For more details see the official docs: | |
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds | |
ARG DARSHAN_VER=3.4.0 | |
FROM docker.io/fedora:36@sha256:486fd5578f93fbc57a519e34ad4b7cac927c3f8a95409baedf0c19e9f287c207 as build | |
ARG DARSHAN_VER | |
RUN dnf install -y \ | |
gcc \ | |
libgcc libxcrypt binutils cpp kernel-headers libgomp glibc-devel \ | |
glibc-headers info isl libmpc libpkgconf pkgconf pkgconf-m4 \ | |
libxcrypt-devel pkgconf-pkg-config \ | |
glibc-devel zlib-devel \ | |
make \ | |
gc guile libatomic_ops libtool libtool-ltdl \ | |
autoconf automake bzip2 bzip2-devel \ | |
&& curl -O ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-$DARSHAN_VER.tar.gz \ | |
&& tar -xf darshan-$DARSHAN_VER.tar.gz && cd darshan-$DARSHAN_VER/darshan-util/ \ | |
&& ../prepare.sh \ | |
&& ./configure --prefix=/usr/local/darshan-$DARSHAN_VER --with-zlib --enable-shared CFLAGS='-fPIC -O3' \ | |
&& make -j \ | |
&& make install | |
FROM docker.io/fedora:36@sha256:486fd5578f93fbc57a519e34ad4b7cac927c3f8a95409baedf0c19e9f287c207 | |
ARG DARSHAN_VER | |
LABEL org.opencontainers.image.authors="Alberto Chiusole <[email protected]>, Lisa Gerhardt <[email protected]>" | |
COPY --from=build /usr/local/darshan-$DARSHAN_VER /usr/local/darshan-$DARSHAN_VER | |
RUN dnf install -y \ | |
texlive-latex \ | |
texlive-epstopdf texlive-lastpage texlive-subfigure \ | |
texlive-multirow texlive-threeparttable texlive-collection-fontsrecommended \ | |
perl-Pod-LaTeX perl-HTML-Parser perl-English \ | |
bzip2 zlib which gnuplot \ | |
&& dnf clean all | |
ENV PATH=/usr/local/darshan-$DARSHAN_VER/bin:$PATH | |
CMD ["darshan-job-summary.pl"] |
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
# darshan-util | |
# http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html | |
# | |
# This container file collects all dependencies required to run the analysis | |
# tools on darshan log files. | |
# To build darshan-util we use a multi-stage build: the first FROM builds the | |
# program, while the second copies only the final files into it. | |
# The first image is discarded and we only keep the second image with the | |
# final executables. For more details see the official docs: | |
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds | |
ARG DARSHAN_VER=3.4.0 | |
# Disable pop-up dialogs, use ARG so applies to build environment only. | |
ARG DEBIAN_FRONTEND=noninteractive | |
FROM ubuntu:22.04 as build | |
LABEL org.opencontainers.image.authors="Alberto Chiusole <[email protected]>, Lisa Gerhardt <[email protected]>" | |
ARG DARSHAN_VER | |
RUN apt update \ | |
&& apt install -y \ | |
curl \ | |
gcc \ | |
python3 coreutils make autoconf libtool zlib1g-dev libbz2-dev bzip2 \ | |
&& curl -O ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-$DARSHAN_VER.tar.gz \ | |
&& tar -xf darshan-$DARSHAN_VER.tar.gz \ | |
&& cd darshan-$DARSHAN_VER/darshan-util/ \ | |
&& ../prepare.sh \ | |
&& ./configure --prefix=/usr/local/darshan-$DARSHAN_VER --with-zlib --enable-shared CFLAGS='-fPIC -O3' \ | |
&& make -j \ | |
&& make install | |
FROM ubuntu:22.04 | |
ARG DARSHAN_VER | |
ARG DEBIAN_FRONTEND | |
COPY --from=build /usr/local/darshan-$DARSHAN_VER /usr/local/darshan-$DARSHAN_VER | |
RUN apt update \ | |
&& apt install -y \ | |
texlive texlive-latex-extra gnuplot texlive-font-utils libpod-latex-perl libhtml-parser-perl \ | |
bzip2 zlib1g zlib1g-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
ENV PATH /usr/local/darshan-$DARSHAN_VER/bin:$PATH | |
CMD ["darshan-job-summary.pl"] |
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
# To build darshan-util we use a multi-stage build: the first FROM builds the | |
# program, while the second copies only the final files into it. | |
# The first docker is discarded, and we keep only the second, much lighter. | |
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds | |
FROM fedora:29 as build | |
MAINTAINER Alberto Chiusole, eXact lab, [email protected] | |
ENV DARSHAN_VER 3.1.6 | |
# We specify gcc and make dependencies because we will uninstall them after | |
# the compilation of darshan. Make sure they are the latest packages installed. | |
RUN apt update | |
RUN dnf install -y \ | |
gcc \ | |
libgcc libxcrypt binutils cpp kernel-headers libgomp glibc-devel \ | |
glibc-headers info isl libmpc libpkgconf pkgconf pkgconf-m4 \ | |
libxcrypt-devel pkgconf-pkg-config \ | |
make \ | |
gc guile libatomic_ops libtool-ltdl \ | |
&& curl -O ftp://ftp.mcs.anl.gov/pub/darshan/releases/darshan-$DARSHAN_VER.tar.gz \ | |
&& tar -xf darshan-$DARSHAN_VER.tar.gz && cd darshan-$DARSHAN_VER/darshan-util/ \ | |
&& ./configure --prefix=/usr/local/darshan-$DARSHAN_VER --with-zlib \ | |
&& make -j \ | |
&& make install | |
FROM fedora:29 | |
COPY --from=build /usr/local/darshan-$DARSHAN_VER /usr/local/darshan-$DARSHAN_VER | |
RUN dnf install -y \ | |
texlive-latex texlive-epstopdf perl-Pod-LaTeX perl-HTML-Parser \ | |
bzip2 zlib zlib-devel \ | |
&& dnf clean all | |
ENV PATH /usr/local/darshan-$DARSHAN_VER/bin:$PATH | |
CMD ["darshan-job-summary.pl"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment