File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,18 +3,34 @@ openhpc
33=======
44Install OpenHPC RPMs from a repo using ``yum ``.
55
6+ * ``DIB_OPENHPC_VERSION `` Specify the version of OpenHPC to install. OpenHPC 1.3
7+ is based on CentOS 7, and OpenHPC 2.0 is based on CentOS 8. Default is ``2.0 ``
8+
9+ * ``DIB_OPENHPC_REPO_RPM `` Override default settings for the URL for the OpenHPC repo
10+ RPM package.
11+
12+ For OpenHPC 1.3 the default is https://github.com/openhpc/ohpc/releases/download/v1.3.GA/ohpc-release-1.3-1.el7.x86_64.rpm
13+
14+ For OpenHPC 2.0 the default is http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm
15+
616* ``DIB_OPENHPC_GRPLIST `` Define a space-separated list of package groups to install.
7- Default is:
17+ Default for OpenHPC 1.3 is:
818
919 ``ohpc-base-compute ohpc-slurm-client "InfiniBand Support" ``
1020
21+ Default for OpenHPC 2.0 is no groups.
22+
1123 Set to an empty string to install no package groups
1224
1325* ``DIB_OPENHPC_PKGLIST `` Define a space-separated list of packages to install.
14- Default is:
26+ Default is for OpenHPC 1.3 is :
1527
1628 ``lmod-ohpc mrsh-ohpc lustre-client-ohpc ``
1729
30+ Default for OpenHPC 2.0 is:
31+
32+ ``ohpc-base lmod-ohpc ohpc-slurm-client ohpc-gnu9-runtimes openmpi4-gnu9-ohpc ``
33+
1834 Set to an empty string to install no individual packages
1935
2036* ``DIB_OPENHPC_DELETE_REPO `` Set to ``y `` or ``Y `` to delete the repo after building the image.
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- export OPENHPC_GRPLIST=${DIB_OPENHPC_GRPLIST:- " ohpc-base-compute ohpc-slurm-client 'InfiniBand Support'" }
4- export OPENHPC_PKGLIST=${DIB_OPENHPC_PKGLIST:- " lmod-ohpc mrsh-ohpc lustre-client-ohpc" }
3+ # Choose from one of a couple of pre-defined repo RPM values
4+ case ${DIB_OPENHPC_VERSION:= " 2.0" } in
5+ " 1.3" )
6+ export OPENHPC_REPO_RPM=" https://github.com/openhpc/ohpc/releases/download/v1.3.GA/ohpc-release-1.3-1.el7.x86_64.rpm"
7+ export OPENHPC_PKGMGR=" yum"
8+ export OPENHPC_GRPLIST=${DIB_OPENHPC_GRPLIST:- " ohpc-base-compute ohpc-slurm-client 'InfiniBand Support'" }
9+ export OPENHPC_PKGLIST=${DIB_OPENHPC_PKGLIST:- " lmod-ohpc mrsh-ohpc lustre-client-ohpc" }
10+ ;;
11+ " 2.0" )
12+ export OPENHPC_REPO_RPM=" http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm"
13+ export OPENHPC_PKGMGR=" dnf"
14+ export OPENHPC_GRPLIST=${DIB_OPENHPC_GRPLIST:- " " }
15+ export OPENHPC_PKGLIST=${DIB_OPENHPC_PKGLIST:- " ohpc-base lmod-ohpc ohpc-slurm-client ohpc-gnu9-runtimes openmpi4-gnu9-ohpc" }
16+ ;;
17+ " *" )
18+ echo " Unrecognised/unsupported version of OpenHPC requested: $DIB_OPENHPC_VERSION "
19+ exit -1;;
20+ esac
21+ export DIB_OPENHPC_VERSION
22+
23+ # A URL for the repo RPM can be supplied directly
24+ [[ ! -z " ${DIB_OPENHPC_REPO_RPM:- } " ]] && export OPENHPC_REPO_RPM=$DIB_OPENHPC_REPO_RPM
25+
526export OPENHPC_DELETE_REPO=${DIB_OPENHPC_DELETE_REPO:- n}
Original file line number Diff line number Diff line change 66set -eu
77set -o pipefail
88
9- [ ! -z " $OPENHPC_GRPLIST " ] && yum groupinstall -y $OPENHPC_GRPLIST
10- [ ! -z " $OPENHPC_PKGLIST " ] && yum install -y $OPENHPC_PKGLIST
9+ [ ! -z " $OPENHPC_GRPLIST " ] && $OPENHPC_PKGMGR groupinstall -y $OPENHPC_GRPLIST
10+ [ ! -z " $OPENHPC_PKGLIST " ] && $OPENHPC_PKGMGR install -y $OPENHPC_PKGLIST
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ set -o pipefail
88
99if [ " $OPENHPC_DELETE_REPO " = " y" -o " $OPENHPC_DELETE_REPO " = " Y" ]
1010then
11- rm -f /etc/yum.repos.d/OpenHPC.repo
11+ $OPENHPC_PKGMGR remove ohpc-release
1212fi
1313
14- systemctl enable ntpd.service
14+ # systemctl enable ntpd.service
Original file line number Diff line number Diff line change 77set -o pipefail
88
99[ -d /etc/yum.repos.d ] || exit -1
10- yum install -y https://github.com/openhpc/ohpc/releases/download/v1.3.GA/ohpc-release-1.3-1.el7.x86_64.rpm
10+ ${OPENHPC_PKGMGR} install -y ${OPENHPC_REPO_RPM}
11+
12+ if [ " $DIB_OPENHPC_VERSION " = " 2.0" ]
13+ then
14+ ${OPENHPC_PKGMGR} config-manager --set-enabled powertools
15+ fi
You can’t perform that action at this time.
0 commit comments