Skip to content

brettviren/wire-cell-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Container images for Wire-Cell Toolkit

This repository holds support for building Linux container images relevant to the Wire-Cell Toolkit.

Requirements

Each image is described in a Containerfile in a subdirectory of images/. You are free to use them to build images in your favorite way. For the remainder of this README and in the automated build system, podman and singularity are used.

Prerequisites

Podman

The podman from a recent OS is likely sufficient:

sudo apt install podman

SingularityCE

See SingularityCE Admin Guide for installation instructions. In addition,

sudo apt install golang-any

CVMFS

To use the containers for development against the FNAL ecosystem served via CVMFS, a /cvmfs/ mount must be provided by the host OS so that it may be mounted into the container. More info is in docs/cvmfs.org.

Building

The images are factored and thus have interdependence. To get that correct, their builds are automated:

$ waf configure
Setting top to                           : /home/bviren/dev/wcls/wire-cell-containers 
Setting out to                           : /home/bviren/dev/wcls/wire-cell-containers/build 
Checking for program 'podman'            : /usr/bin/podman 
Checking for program 'singularity'       : /usr/local/bin/singularity 
'configure' finished successfully (0.005s)

$ waf
...
'build' finished successfully (5m42.697s)

$ ls -lh build/*.sif
-rwxr-xr-x 1 bviren bviren 354M Aug 14 09:32 build/wirecell-sluser.sif

You can use the Singularity image directly from build/ or you may prefer to control an installation prefix to place them in $prefix/containers/singularity/:

$ waf configure --prefix=$HOME/.local
$ waf install

By default images are produced with the “owner” of “wirecell” which matters for the name in the podman store and the file name for the Singularity image. Another owner can be set:

$ waf --owner myname
$ ls build/myname-*.sif

Using

Below are some basic commands to get started but additional documents provide more advanced usage that will make developing easier.

Singularity

By default, Singularity makes your host files visible and writable in the container.

Single commands

$ ./build/wirecell-sluser.sif lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Scientific
Description:	Scientific Linux release 7.9 (Nitrogen)
Release:	7.9
Codename:	Nitrogen

Interactive

$ singularity shell --cleanenv --bind /cvmfs build/wirecell-sluser.sif 

Singularity> source /cvmfs/larsoft.opensciencegrid.org/setup_larsoft.sh 
Singularity> setup larsoft v09_77_00 -q c14:prof
Singularity> art --version
art 3.12.00
Singularity> exit

Podman

t.b.d.

Cleaning up

To remove build/:

$ waf distclean

The local podman will fill:

$ podman image ls

Any “dangling” images can be pruned:

$ podman image prune

Or remove things piecemeal:

$ podman image rm localhost/wirecell/slscisoft
$ podman image rm localhost/wirecell/sluser

Other info

  • Some notes on use of podman.
  • How to exploit direnv to make development with a container easier.

About

Container images for Wire-Cell Toolkit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published