forked from NVIDIA/hpc-container-maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hpcbase-gnu-openmpi.py
56 lines (42 loc) · 1.27 KB
/
hpcbase-gnu-openmpi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
HPC Base image
Contents:
CUDA version 10.1
FFTW version 3.3.8
GNU compilers (upstream)
HDF5 version 1.10.5
Mellanox OFED version 4.6-1.0.1.1
OpenMPI version 4.0.2
Python 2 and 3 (upstream)
"""
# pylint: disable=invalid-name, undefined-variable, used-before-assignment
# Choose between either Ubuntu 16.04 (default) or CentOS 7
# Add '--userarg centos=true' to the command line to select CentOS
devel_image = 'nvcr.io/nvidia/cuda:10.1-devel-ubuntu16.04'
runtime_image = 'nvcr.io/nvidia/cuda:10.1-runtime-ubuntu16.04'
if USERARG.get('centos', False):
devel_image = 'nvcr.io/nvidia/cuda:10.1-devel-centos7'
runtime_image = 'nvcr.io/nvidia/cuda:10.1-runtime-centos7'
######
# Devel stage
######
Stage0 += comment(__doc__, reformat=False)
Stage0 += baseimage(image=devel_image, _as='devel')
# Python
Stage0 += python()
# GNU compilers
compiler = gnu()
Stage0 += compiler
# Mellanox OFED
Stage0 += mlnx_ofed(version='4.6-1.0.1.1')
# OpenMPI
Stage0 += openmpi(version='4.0.2', toolchain=compiler.toolchain)
# FFTW
Stage0 += fftw(version='3.3.8', mpi=True, toolchain=compiler.toolchain)
# HDF5
Stage0 += hdf5(version='1.10.5', toolchain=compiler.toolchain)
######
# Runtime image
######
Stage1 += baseimage(image=runtime_image)
Stage1 += Stage0.runtime(_from='devel')