Hands-on #2
Singularity configuration file
We will build a container image for LAMMPS code using CentOS as the base image. A template Singularity configuration file is shown below:
Create/use the lammps template configuration file
lammps.cfg
Header
We will BootStrap CentOS version 7
with package manager yum
. The MirrorURL
for downloading CentOS is http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
. Include: yum
.
Sections
In this example, we will use %setup
, %post
and %runscript
.
Download and copy LAMMPS to
/opt
. Use$SINGULARITY_ROOTFS
to access root file system in the container:
Install development tools:
yum -y groupinstall "Development Tools"
Configure and compile LAMMPS
Configure the container to run
lmp_serial
on execution of the container:
Creating the container image
Create a container called
lammps
and modify the size to 2048 MiB.
Build the lammps configuration file created in the previous step.
Note Building step requires
root
access.
Running the container image
To execute the container
Last updated