initial commit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sif
|
||||
38
.gitlab-ci.yml
Normal file
38
.gitlab-ci.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
stages:
|
||||
- release
|
||||
|
||||
build:
|
||||
stage: relese
|
||||
extends: .docker-build
|
||||
script:
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context $CI_PROJECT_DIR \
|
||||
--dockerfile $CI_PROJECT_DIR/Dockerfile \
|
||||
--target sdk \
|
||||
--destination $CI_REGISTRY_IMAGE-sdk:2025.2.1
|
||||
- |
|
||||
/kaniko/executor \
|
||||
--context $CI_PROJECT_DIR \
|
||||
--dockerfile $CI_PROJECT_DIR/Dockerfile \
|
||||
--target runtime \
|
||||
--destination $CI_REGISTRY_IMAGE-runtime:2025.2.1
|
||||
|
||||
.docker-build:
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
artifacts:
|
||||
paths:
|
||||
- Dockerfile
|
||||
expire_in: 7 days
|
||||
before_script:
|
||||
- |-
|
||||
echo "{
|
||||
\"auths\": {
|
||||
\"$CI_REGISTRY\" :{
|
||||
\"username\":\"$CI_REGISTRY_USER\",
|
||||
\"password\":\"$CI_REGISTRY_PASSWORD\"}
|
||||
}
|
||||
}" > /kaniko/.docker/config.json
|
||||
- cat $KUBE_CA_PEM_FILE >> /kaniko/ssl/certs/ca-certificates.crt
|
||||
158
Dockerfile
Normal file
158
Dockerfile
Normal file
@@ -0,0 +1,158 @@
|
||||
# docker build --target sdk -t intel-obxkit-sdk:2025.2.1
|
||||
# docker build --target runtime -t intel-obxkit-runtime:2025.2.1
|
||||
FROM intel/oneapi-hpckit:latest AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update -y \
|
||||
&& apt install -y git wget cmake m4 gfortran autotools-dev autoconf libtool flex \
|
||||
libevent-dev libhwloc-dev libnuma-dev libibverbs-dev librdmacm-dev \
|
||||
libmunge-dev linux-headers-generic libpthread-stubs0-dev \
|
||||
libxml2-dev libcurl4-gnutls-dev
|
||||
RUN rm -rf /var/cache/apt/*
|
||||
|
||||
RUN cd /usr/lib \
|
||||
&& ln -s ./x86_64-linux-gnu/libmunge.a \
|
||||
&& ln -s ./x86_64-linux-gnu/libmunge.la \
|
||||
&& ln -s ./x86_64-linux-gnu/libmunge.so
|
||||
|
||||
RUN mkdir -p /build \
|
||||
&& cd /build \
|
||||
&& wget https://www.zlib.net/zlib-1.3.1.tar.gz \
|
||||
&& tar xf zlib-1.3.1.tar.gz \
|
||||
&& mv zlib-1.3.1 zlib \
|
||||
# git clone --branch knem-1.1.4 --depth=1 https://gitlab.inria.fr/knem/knem.git \
|
||||
&& git clone --depth=1 https://gitlab.inria.fr/knem/knem.git \
|
||||
&& git clone --branch v1.18.1 --depth=1 https://github.com/openucx/ucx.git \
|
||||
&& git clone --branch v2.3.0 --depth=1 https://github.com/ofiwg/libfabric.git \
|
||||
&& git clone --branch hdf5-1.14.6 --depth=1 https://github.com/HDFGroup/hdf5.git \
|
||||
&& git clone --branch v4.9.3 --depth=1 https://github.com/Unidata/netcdf-c.git \
|
||||
&& git clone --branch v4.6.2 --depth=1 https://github.com/Unidata/netcdf-fortran.git \
|
||||
&& git clone --branch v5.0.9 --depth=1 https://github.com/openpmix/openpmix.git \
|
||||
&& git clone --branch v5.0.8 --depth=1 https://github.com/open-mpi/ompi.git \
|
||||
&& cd /build/openpmix && git submodule update --init --recursive \
|
||||
&& cd /build/ompi && git submodule update --init --recursive
|
||||
|
||||
RUN cd /build/zlib \
|
||||
&& ./configure --prefix=/opt/zlib \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/knem \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --prefix=/opt/knem --with-linux-release=$(basename /lib/modules/*generic) \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/openpmix \
|
||||
&& ./autogen.pl \
|
||||
&& ./configure --prefix=/opt/pmix --with-zlib=/opt/zlib --with-munge=/usr \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/ucx \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --prefix=/opt/ucx \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/libfabric \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --prefix=/opt/ofi \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/ompi \
|
||||
&& rm -rf /usr/include/level_zero \
|
||||
&& ./autogen.pl
|
||||
|
||||
RUN cd /build/ompi \
|
||||
&& env CC=icx CXX=icpx F77=ifx FC=ifx ./configure \
|
||||
--with-knem=/opt/knem \
|
||||
--with-ucx=/opt/ucx \
|
||||
--with-pmix=/opt/pmix \
|
||||
--with-zlib=/opt/zlib \
|
||||
--with-ofi=/opt/ofi \
|
||||
--with-libevent \
|
||||
--without-verbs \
|
||||
--without-cuda \
|
||||
--prefix=/opt/openmpi \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/hdf5 \
|
||||
&& CC=icx CXX=icpx CFC=ifx ./configure --prefix=/opt/hdf5 \
|
||||
--enable-fortran --enable-cxx --with-zlib=/opt/zlib \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/netcdf-c \
|
||||
&& export LD_LIBRARY_PATH=/opt/hdf5/lib:/opt/zlib/lib:${LD_LIBRARY_PATH} \
|
||||
&& export CPPFLAGS="-I/opt/hdf5/include -I/opt/zlib/include" \
|
||||
&& export LDFLAGS="-L/opt/hdf5/lib -L/opt/zlib/lib" \
|
||||
&& ./configure --prefix=/opt/netcdf-c \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN cd /build/netcdf-fortran \
|
||||
&& _dep=/opt/netcdf-c \
|
||||
&& export LD_LIBRARY_PATH=${_dep}/lib:${LD_LIBRARY_PATH} \
|
||||
&& export CPPFLAGS=-I${_dep}/include \
|
||||
&& export LDFLAGS=-L${_dep}/lib \
|
||||
&& export FC=ifx \
|
||||
&& ./configure --prefix=/opt/netcdf-fortran \
|
||||
&& make -j 16 install
|
||||
|
||||
RUN mkdir -p /opt/include \
|
||||
&& cp -rs /opt/netcdf-c/include/* /opt/include \
|
||||
&& cp -rs /opt/netcdf-fortran/include/* /opt/include \
|
||||
&& mkdir -p /opt/lib \
|
||||
&& cp -rs /opt/netcdf-c/lib/* /opt/lib \
|
||||
&& cp -rs /opt/netcdf-fortran/lib/* /opt/lib
|
||||
|
||||
RUN rm -rf /build
|
||||
|
||||
FROM ubuntu:24.04 AS sdk
|
||||
WORKDIR /
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update -y \
|
||||
&& apt install -y git wget cmake m4 gcc g++ gfortran autotools-dev autoconf libtool flex \
|
||||
libevent-dev libhwloc-dev libnuma-dev libibverbs-dev librdmacm-dev \
|
||||
libmunge-dev linux-headers-generic libpthread-stubs0-dev \
|
||||
libxml2-dev libcurl4-gnutls-dev
|
||||
RUN rm -rf /var/cache/apt/*
|
||||
|
||||
COPY --from=builder /opt /opt
|
||||
|
||||
RUN cd /opt/intel/oneapi \
|
||||
&& rm -rf dnnl ippcp modulefiles-setup.sh advisor dal dpcpp-ct \
|
||||
ishmem support.txt vtune ccl debugger dpl licensing \
|
||||
oneapi-hpc-toolkit tbb dev-utilities ipp pti tcm
|
||||
|
||||
RUN cd /opt/intel/oneapi/compiler/latest \
|
||||
&& rm -rf include share/doc share/ide_support etc lib/libsycl*
|
||||
|
||||
RUN cd /opt/intel/oneapi/mpi/latest \
|
||||
&& rm -rf lib/debug lib/debug_mt lib/mpi share etc
|
||||
|
||||
RUN cd /opt/intel/oneapi/mkl/latest \
|
||||
&& rm -rf share etc lib/*_ilp64.* lib/*_sycl* lib/*_tbb_*
|
||||
|
||||
RUN find /opt -xtype l ! -exec test -e {} \; -print | xargs rm
|
||||
|
||||
ENV LC_ALL=C
|
||||
ENV ONEAPI=/opt/bin:/opt/intel/oneapi/2025.2
|
||||
ENV PATH=/opt/bin:${ONEAPI}/bin:${PATH}
|
||||
ENV LD_LIBRARY_PATH=/opt/lib:${ONEAPI}/lib:${ONEAPI}/libfabric:${LD_LIBRARY_PATH}
|
||||
ENV CPATH=/opt/include:${ONEAPI}/include:${CPATH}
|
||||
|
||||
ENV CC=icx
|
||||
ENV CXX=icpx
|
||||
ENV FC=ifx
|
||||
ENV MPICC=mpiicx
|
||||
ENV MPIFC=mpiicpx
|
||||
ENV MPIFC=mpiifx
|
||||
ENV I_MPI_ROOT=/opt/intel/oneapi/mpi/latest
|
||||
ENV I_MPI_FC=ifx
|
||||
ENV I_MPI_F77=ifx
|
||||
ENV I_MPI_F90=ifx
|
||||
|
||||
FROM sdk AS runtime
|
||||
WORKDIR /
|
||||
RUN rm -rf /opt/intel/oneapi/compiler/latest/bin
|
||||
RUN rm -rf /opt/intel/oneapi/mpi/latest/bin
|
||||
RUN find /opt -name \*.a -exec rm {} \;
|
||||
RUN find /usr -name \*.a -exec rm {} \;
|
||||
|
||||
7
build.sh
Executable file
7
build.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
docker build --target sdk -t intel-obxkit-sdk:2025.2.1 .
|
||||
docker build --target runtime -t intel-obxkit-runtime:2025.2.1 .
|
||||
|
||||
sudo singularity build intel-obxkit-sdk.sif docker-daemon://intel-obxkit-sdk:2025.2.1
|
||||
sudo singularity build intel-obxkit-runtime.sif docker-daemon://intel-obxkit-runtime:2025.2.1
|
||||
35
hpl-intel.def
Normal file
35
hpl-intel.def
Normal file
@@ -0,0 +1,35 @@
|
||||
Bootstrap: localimage
|
||||
From: intel-obxkit-sdk.sif
|
||||
Stage: build
|
||||
|
||||
%files
|
||||
/home/jonas/src/hpl-2.3.tar.gz /build/hpl-2.3.tar.gz
|
||||
|
||||
%post
|
||||
cd /build
|
||||
tar vfxz hpl-2.3.tar.gz
|
||||
cd hpl-2.3
|
||||
CC=icx MPICC=mpiicx ./configure
|
||||
make -j
|
||||
|
||||
Bootstrap: localimage
|
||||
From: intel-obxkit-runtime.sif
|
||||
Stage: runtime
|
||||
|
||||
%environment
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app
|
||||
|
||||
%files from build
|
||||
/build/hpl-2.3/testing/xhpl /app/xhpl
|
||||
|
||||
%runscript
|
||||
/app/xhpl
|
||||
|
||||
%labels
|
||||
Author jonas@juselius.io
|
||||
|
||||
%help
|
||||
High-Performance LinPACK
|
||||
https://www.advancedclustering.com/act_kb/tune-hpl-dat-file/
|
||||
|
||||
# vim:ft=singularity
|
||||
Reference in New Issue
Block a user