forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Singularity definition file for virtual fugaku
- Loading branch information
1 parent
df8f4c8
commit c78e252
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Bootstrap: docker | ||
From: redhat/ubi8 | ||
|
||
%setup | ||
mkdir ${SINGULARITY_ROOTFS}/opt/amazon | ||
|
||
%files | ||
# /opt/amazon | ||
|
||
%post | ||
|
||
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||
dnf -y install git gcc* make xz patch bzip2* autoconf* automake libtool* libevent* | ||
dnf -y install binutils ctags curl findutils gdb glibc-devel gnupg2 hostname iproute perl-Fedora-VSP perl-generators perl-Sys-Syslog pkgconf* python39 python3-boto3 python3-pip python3-setuptools redhat-lsb-core redhat-rpm-config source-highlight strace unzip | ||
dnf repolist | ||
dnf list installed | ||
|
||
cd /opt | ||
git clone https://github.com/RIKEN-RCCS/spack.git | ||
cd spack | ||
git checkout virtual_fugaku | ||
|
||
. ./share/spack/setup-env.sh | ||
|
||
spack install hwloc | ||
HWLOC=$(find /opt/spack/opt/spack/linux-rhel8-neoverse_v1 -name 'libhwloc.so.15.*' | tail -n 1) | ||
ln -s ${HWLOC} /usr/lib64 | ||
ln -s ${HWLOC} /usr/lib64/libhwloc.so | ||
ln -s ${HWLOC} /usr/lib64/libhwloc.so.15 | ||
|
||
spack install gcc+binutils | ||
spack load gcc | ||
spack compiler find | ||
spack env create virtual_fugaku etc/spack/spack.yaml | ||
spack env activate -p virtual_fugaku | ||
spack add gcc | ||
spack concretize | ||
spack install | ||
|
||
spack env deactivate | ||
|
||
spack env activate --sh virtual_fugaku >> $SINGULARITY_ENVIRONMENT |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Bootstrap: localimage | ||
From: spack_all.sif | ||
Stage: build | ||
|
||
%post | ||
. /opt/spack/share/spack/setup-env.sh | ||
spack env activate virtual_fugaku | ||
spack gc -y | ||
spack clean --all | ||
|
||
Bootstrap: docker | ||
From: redhat/ubi8 | ||
Stage: final | ||
|
||
%setup | ||
mkdir ${SINGULARITY_ROOTFS}/opt/amazon | ||
|
||
%files from build | ||
/opt/spack | ||
/usr/lib64/libhwloc.so.15.6.4 | ||
|
||
%post | ||
dnf -y install libevent* | ||
dnf clean all | ||
|
||
cd /usr/lib64 | ||
ln -s libhwloc.so.15.6.4 libhwloc.so | ||
|
||
. /opt/spack/share/spack/setup-env.sh | ||
spack env activate --sh virtual_fugaku >> $SINGULARITY_ENVIRONMENT |