Singularity Container Documentation Release 3.3
Total Page:16
File Type:pdf, Size:1020Kb
Singularity Container Documentation Release 3.3 User Docs Jul 26, 2019 CONTENTS 1 Quick Start 1 1.1 Quick Installation Steps.........................................1 1.1.1 Install system dependencies..................................1 1.1.2 Install Go............................................2 1.1.3 Download Singularity from a release..............................2 1.1.4 Compile the Singularity source code..............................2 1.2 Overview of the Singularity Interface..................................2 1.3 Download pre-built images........................................5 1.4 Interact with images...........................................5 1.4.1 Shell...............................................6 1.4.2 Executing Commands......................................6 1.4.3 Running a container.......................................7 1.5 Working with Files............................................7 1.6 Build images from scratch........................................8 1.6.1 Sandbox Directories......................................8 1.6.2 Converting images from one format to another.........................9 1.6.3 Singularity Definition Files...................................9 2 Contributing 11 2.1 Join the community........................................... 11 2.1.1 Singularity Google Group................................... 11 2.1.2 Singularity on Slack...................................... 11 2.2 Raise an Issue.............................................. 11 2.3 Write Documentation.......................................... 11 2.4 Contribute to the code.......................................... 12 2.4.1 Step 1. Fork the repo...................................... 12 2.4.2 Step 2. Checkout a new branch................................. 12 2.4.3 Step 3. Make your changes................................... 12 2.4.4 Step 4. Push your branch to your fork............................. 13 2.4.5 Step 5. Submit a Pull Request................................. 13 2.4.6 Step 6. Keep your branch in sync................................ 13 3 Installation 15 3.1 Overview................................................. 15 3.2 Install on Linux.............................................. 15 3.2.1 Before you begin........................................ 15 3.2.1.1 Install Dependencies.................................. 15 3.2.1.2 Install Go....................................... 16 3.2.2 Download Singularity from a release.............................. 16 3.2.3 Download from source..................................... 16 i 3.2.3.1 Compile Singularity.................................. 17 3.2.3.2 Source bash completion file.............................. 17 3.2.4 Build and install an RPM.................................... 17 3.2.5 Remove an old version..................................... 18 3.2.6 Distribution packages of Singularity.............................. 18 3.2.6.1 Install the Debian/Ubuntu package using apt .................... 19 3.2.6.2 Install the CentOS/RHEL package using yum .................... 20 3.3 Install on Windows or Mac........................................ 20 3.3.1 Setup.............................................. 20 3.3.1.1 Windows........................................ 20 3.3.1.2 Mac.......................................... 20 3.3.2 Singularity Vagrant Box.................................... 21 3.4 Singularity on a shared resource..................................... 21 4 Security in Singularity Containers 23 4.1 Singularity Runtime........................................... 23 4.2 Singularity Image Format (SIF)..................................... 23 4.3 Admin Configurable Files........................................ 24 4.3.1 cgroups support......................................... 24 4.3.2 --security options..................................... 24 4.4 Security in SCS.............................................. 24 4.4.1 Remote Builder......................................... 24 4.4.2 Container Library........................................ 25 4.4.3 Key Store............................................ 25 4.4.4 Security Considerations of Cloud Services:.......................... 25 5 Command Line Interface 27 5.1 singularity................................................ 27 5.1.1 Synopsis............................................. 27 5.1.2 Examples............................................ 27 5.1.3 Options............................................. 27 5.1.4 SEE ALSO........................................... 27 5.2 singularity apps.............................................. 28 5.2.1 Synopsis............................................. 28 5.2.2 Examples............................................ 29 5.2.3 Options............................................. 29 5.2.4 SEE ALSO........................................... 29 5.3 singularity build............................................. 29 5.3.1 Synopsis............................................. 29 5.3.2 Examples............................................ 30 5.3.3 Options............................................. 32 5.3.4 SEE ALSO........................................... 32 5.4 singularity cache............................................. 32 5.4.1 Synopsis............................................. 32 5.4.2 Examples............................................ 32 5.4.3 Options............................................. 33 5.4.4 SEE ALSO........................................... 33 5.5 singularity cache clean.......................................... 33 5.5.1 Synopsis............................................. 33 5.5.2 Examples............................................ 33 5.5.3 Options............................................. 33 5.5.4 SEE ALSO........................................... 34 5.6 singularity cache list........................................... 34 5.6.1 Synopsis............................................. 34 ii 5.6.2 Examples............................................ 34 5.6.3 Options............................................. 34 5.6.4 SEE ALSO........................................... 34 5.7 singularity capability........................................... 34 5.7.1 Synopsis............................................. 35 5.7.2 Examples............................................ 35 5.7.3 Options............................................. 35 5.7.4 SEE ALSO........................................... 35 5.8 singularity capability add........................................ 35 5.8.1 Synopsis............................................. 35 5.8.2 Examples............................................ 35 5.8.3 Options............................................. 36 5.8.4 SEE ALSO........................................... 36 5.9 singularity capability avail........................................ 36 5.9.1 Synopsis............................................. 36 5.9.2 Examples............................................ 36 5.9.3 Options............................................. 36 5.9.4 SEE ALSO........................................... 37 5.10 singularity capability drop........................................ 37 5.10.1 Synopsis............................................. 37 5.10.2 Examples............................................ 37 5.10.3 Options............................................. 37 5.10.4 SEE ALSO........................................... 37 5.11 singularity capability list......................................... 37 5.11.1 Synopsis............................................. 38 5.11.2 Examples............................................ 38 5.11.3 Options............................................. 38 5.11.4 SEE ALSO........................................... 38 5.12 singularity exec.............................................. 38 5.12.1 Synopsis............................................. 38 5.12.2 Examples............................................ 39 5.12.3 Options............................................. 39 5.12.4 SEE ALSO........................................... 40 5.13 singularity inspect............................................ 40 5.13.1 Synopsis............................................. 40 5.13.2 Examples............................................ 41 5.13.3 Options............................................. 42 5.13.4 SEE ALSO........................................... 42 5.14 singularity instance............................................ 42 5.14.1 Synopsis............................................. 42 5.14.2 Examples............................................ 42 5.14.3 Options............................................. 42 5.14.4 SEE ALSO........................................... 43 5.15 singularity instance list.......................................... 43 5.15.1 Synopsis............................................. 43 5.15.2 Examples............................................ 43 5.15.3 Options............................................. 43 5.15.4 SEE ALSO........................................... 43 5.16 singularity instance start......................................... 43 5.16.1 Synopsis............................................. 44 5.16.2 Examples............................................ 44 5.16.3 Options............................................. 44 5.16.4 SEE ALSO........................................... 45 5.17 singularity instance stop......................................... 46 iii 5.17.1 Synopsis............................................. 46 5.17.2 Examples............................................ 46 5.17.3 Options............................................