Skip to content

Commit 4cac8ad

Browse files
authored
Refresh example recipes and documentation (#540)
1 parent 1e9021e commit 4cac8ad

11 files changed

Lines changed: 135 additions & 402 deletions

.github/workflows/docker_build.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,12 @@ jobs:
3232
#- recipe: recipes/gromacs/gromacs.py
3333
# userargs: none=none
3434
# context: .
35-
- recipe: recipes/hpcbase-gnu-mvapich2.py
35+
- recipe: recipes/hpcbase-nvhpc-hpcx.py
3636
userargs: none=none
3737
context: .
38-
#- recipe: recipes/hpcbase-gnu-mvapich2.py
39-
# userargs: centos=true
40-
# context: .
41-
- recipe: recipes/hpcbase-gnu-openmpi.py
38+
- recipe: recipes/hpcbase-gnu-hpcx.py
4239
userargs: none=none
4340
context: .
44-
#- recipe: recipes/hpcbase-gnu-openmpi.py
45-
# userargs: centos=true
46-
# context: .
47-
#- recipe: recipes/hpcbase-nvhpc-mvapich2.py
48-
# userargs: nvhpc_eula_accept=yes
49-
# context: .
50-
#- recipe: recipes/hpcbase-nvhpc-mvapich2.py
51-
# userargs: nvhpc_eula_accept=yes centos=true
52-
# context: .
53-
#- recipe: recipes/hpcbase-nvhpc-openmpi.py
54-
# userargs: nvhpc_eula_accept=yes
55-
# context: .
56-
#- recipe: recipes/hpcbase-nvhpc-openmpi.py
57-
# userargs: nvhpc_eula_accept=yes centos=true
58-
# context: .
5941
- recipe: recipes/hpccm/bootstrap.py
6042
userargs: none=none
6143
context: .
@@ -65,9 +47,9 @@ jobs:
6547
#- recipe: recipes/milc/milc.py
6648
# userargs: none=none
6749
# context: .
68-
#- recipe: recipes/mpi_bandwidth.py
69-
# userargs: none=none
70-
# context: .
50+
- recipe: recipes/mpi_bandwidth.py
51+
userargs: none=none
52+
context: .
7153
#- recipe: recipes/osu_benchmarks/osu_benchmarks.py
7254
# userargs: none=none
7355
# context: recipes/osu_benchmarks

.github/workflows/singularity_build.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,12 @@ jobs:
3232
#- recipe: recipes/gromacs/gromacs.py
3333
# userargs: none=none
3434
# context: .
35-
- recipe: recipes/hpcbase-gnu-mvapich2.py
35+
- recipe: recipes/hpcbase-gnu-hpcx.py
3636
userargs: none=none
3737
context: .
38-
#- recipe: recipes/hpcbase-gnu-mvapich2.py
39-
# userargs: centos=true
40-
# context: .
41-
- recipe: recipes/hpcbase-gnu-openmpi.py
38+
- recipe: recipes/hpcbase-nvhpc-hpcx.py
4239
userargs: none=none
4340
context: .
44-
#- recipe: recipes/hpcbase-gnu-openmpi.py
45-
# userargs: centos=true
46-
# context: .
47-
#- recipe: recipes/hpcbase-nvhpc-mvapich2.py
48-
# userargs: nvhpc_eula_accept=yes
49-
# context: .
50-
#- recipe: recipes/hpcbase-nvhpc-mvapich2.py
51-
# userargs: nvhpc_eula_accept=yes centos=true
52-
# context: .
53-
#- recipe: recipes/hpcbase-nvhpc-openmpi.py
54-
# userargs: nvhpc_eula_accept=yes
55-
# context: .
56-
#- recipe: recipes/hpcbase-nvhpc-openmpi.py
57-
# userargs: nvhpc_eula_accept=yes centos=true
58-
# context: .
5941
- recipe: recipes/hpccm/bootstrap.py
6042
userargs: none=none
6143
context: .
@@ -65,9 +47,9 @@ jobs:
6547
#- recipe: recipes/milc/milc.py
6648
# userargs: none=none
6749
# context: .
68-
#- recipe: recipes/mpi_bandwidth.py
69-
# userargs: none=none
70-
# context: .
50+
- recipe: recipes/mpi_bandwidth.py
51+
userargs: none=none
52+
context: .
7153
#- recipe: recipes/osu_benchmarks/osu_benchmarks.py
7254
# userargs: none=none
7355
# context: recipes/osu_benchmarks

docs/workflows.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,17 @@ HPC software components present can be used as the starting point for
4343
building an application container image.
4444

4545
HPCCM includes [base recipes](/recipes) for all combinations of the
46-
Ubuntu and CentOS Linux distributions, the GNU and PGI compilers, and
47-
the OpenMPI and MVAPICH2 MPI libraries, plus commonly used software
48-
components such as the Mellanox OpenFabrics Enterprise Distribution,
49-
Python, FFTW, and HDF5. The provided base recipe can be easily
50-
customized to change component versions or add or subtract building
51-
blocks.
46+
Ubuntu and RHEL-based Linux distributions, the GNU and NVHPC compilers,
47+
plus commonly used software components such as the OpenFabrics Enterprise
48+
Distribution, HPC-X, FFTW, HDF5, and NetCDF. The provided base recipe
49+
can be easily customized to change component versions or add or subtract
50+
building blocks.
5251

5352
For example:
5453

5554
```
56-
$ wget https://raw.githubusercontent.com/NVIDIA/hpc-container-maker/master/recipes/hpcbase-gnu-openmpi.py
57-
$ hpccm --recipe hpcbase-gnu-openmpi.py > Dockerfile
55+
$ wget https://raw.githubusercontent.com/NVIDIA/hpc-container-maker/master/recipes/hpcbase-gnu-hpcx.py
56+
$ hpccm --recipe hpcbase-gnu-hpcx.py > Dockerfile
5857
$ sudo docker build -t hpcbase -f Dockerfile .
5958
```
6059

recipes/hpcbase-gnu-hpcx.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
"""
2+
HPC Base image
3+
4+
Contents:
5+
CUDA
6+
FFTW
7+
GNU compilers
8+
HDF5
9+
HPC-X (Open MPI, UCX, etc.)
10+
NetCDF
11+
+ typical development environment
12+
13+
Use --userarg cuda_version=X.Y.Z and/or --userarg distro=<value> to
14+
alter the defaults, where X.Y.Z is 13.2.0, for instance, and the distro
15+
value is ubuntu24.04 or rockylinux9.
16+
"""
17+
18+
cuda_version = USERARG.get('cuda_version', '13.2.0')
19+
distro = USERARG.get('distro', 'ubuntu24.04')
20+
runtime = USERARG.get('runtime', False)
21+
22+
######
23+
# Devel stage
24+
######
25+
26+
Stage0 += comment(__doc__, reformat=False)
27+
28+
Stage0 += baseimage(image='nvcr.io/nvidia/cuda:{0}-devel-{1}'.format(cuda_version, distro), _as='devel')
29+
30+
# Typical development environment
31+
common_packages = ['automake', 'autoconf', 'autoconf-archive', 'binutils',
32+
'bzip2', 'ca-certificates', 'cmake', 'diffutils', 'file',
33+
'gdb', 'git', 'gzip', 'libtool', 'make', 'numactl', 'patch',
34+
'tar', 'vim', 'wget']
35+
Stage0 += packages(apt=common_packages + ['libaec-dev', 'libnuma-dev',
36+
'libsz2', 'lmod', 'xz-utils',
37+
'zlib1g-dev'],
38+
epel=True,
39+
powertools=True if distro == 'rockylinux8' else False,
40+
yum=common_packages + ['Lmod', 'libaec-devel',
41+
'numactl-devel', 'xz', 'zlib-devel'])
42+
43+
# GNU compilers
44+
compiler = gnu()
45+
Stage0 += compiler
46+
47+
# OFED
48+
Stage0 += ofed()
49+
50+
# gdrcopy
51+
Stage0 += gdrcopy(ldconfig=True, version='2.4.2', annotate=True)
52+
53+
# HPC-X
54+
Stage0 += hpcx(version='2.25.1', hpcxinit=False, inbox=True, ldconfig=True)
55+
56+
# FFTW
57+
Stage0 += fftw(version='3.3.10', mpi=True, toolchain=compiler.toolchain,
58+
annotate=True)
59+
60+
# HDF5
61+
Stage0 += hdf5(version='1.14.5', toolchain=compiler.toolchain, annotate=True)
62+
63+
# NetCDF
64+
Stage0 += netcdf(version='4.9.2', version_cxx='4.3.1', version_fortran='4.6.1',
65+
toolchain=compiler.toolchain, annotate=True)
66+
67+
######
68+
# Runtime image
69+
######
70+
71+
if runtime:
72+
Stage1 += baseimage(image='nvcr.io/nvidia/cuda:{0}-runtime-{1}'.format(cuda_version, distro))
73+
74+
Stage1 += Stage0.runtime(_from='devel')

recipes/hpcbase-gnu-mvapich2.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

recipes/hpcbase-gnu-openmpi.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

recipes/hpcbase-nvhpc-hpcx.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""
2+
HPC Base image
3+
4+
Contents:
5+
FFTW
6+
HDF5
7+
NetCDF
8+
NVIDIA HPC SDK (CUDA, HPC-X, NVIDIA HPC Compilers)
9+
+ typical development environment
10+
11+
Use --userarg nvhpc_version=X.Y and/or --userarg distro=<value> to
12+
alter the defaults, where X.Y.Z is 26.3, for instance, and the distro
13+
value is ubuntu24.04 or rockylinux9.
14+
"""
15+
16+
nvhpc_version = USERARG.get('nvhpc_version', '26.3')
17+
distro = USERARG.get('distro', 'ubuntu24.04')
18+
19+
Stage0 += comment(__doc__, reformat=False)
20+
21+
Stage0 += baseimage(image='nvcr.io/nvidia/nvhpc:{0}-devel-cuda_multi-{1}'.format(nvhpc_version, distro), _as='devel')
22+
23+
# Create compiler toolchain
24+
tc = hpccm.toolchain(CC='nvc', CXX='nvc++', F77='nvfortran', F90='nvfortran',
25+
FC='nvfortran')
26+
27+
# FFTW
28+
Stage0 += fftw(version='3.3.10', mpi=True, toolchain=tc, annotate=True)
29+
30+
# HDF5
31+
# Disable float16 to workaround missing intrinsics in older Linux
32+
# distributions / GCC versions
33+
Stage0 += hdf5(version='1.14.5', toolchain=tc, annotate=True,
34+
enable_nonstandard_feature_float16='no')
35+
36+
# NetCDF
37+
Stage0 += netcdf(version='4.9.2', version_cxx='4.3.1', version_fortran='4.6.1',
38+
toolchain=tc, annotate=True)

0 commit comments

Comments
 (0)