From dfba70276f85c2909835297527077f3086758697 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sun, 9 Apr 2017 21:09:33 -0400 Subject: [PATCH 01/30] adding fork me on github, page on environment metadata, and making tons of changes for 2.3! --- _data/sidebars/user_docs.yml | 4 + _includes/github_banner.html | 6 + _layouts/default.html | 1 + assets/img/diagram/singularity-2.3-flow.png | Bin 0 -> 53680 bytes index.md | 12 +- pages/docs/contributing/contributing-code.md | 37 ++- pages/docs/overview/faq.md | 128 +++++---- pages/docs/overview/start.md | 125 +++++++-- .../user-docs/docs-changing-containers.md | 34 ++- pages/docs/user-docs/docs-create-an-image.md | 40 ++- pages/docs/user-docs/docs-docker.md | 264 +++++++++--------- .../user-docs/docs-environment-metadata.md | 79 ++++++ pages/docs/user-docs/docs-exec.md | 60 +++- pages/docs/user-docs/docs-export.md | 18 +- pages/docs/user-docs/docs-import.md | 21 +- .../docs-quick-start-installation.md | 116 ++++++-- pages/docs/user-docs/docs-run.md | 75 +++-- pages/docs/user-docs/docs-shell.md | 110 ++++---- pages/docs/user-docs/docs-usage.md | 22 +- pages/docs/user-docs/user-guide.md | 9 +- 20 files changed, 775 insertions(+), 386 deletions(-) create mode 100644 _includes/github_banner.html create mode 100644 assets/img/diagram/singularity-2.3-flow.png create mode 100644 pages/docs/user-docs/docs-environment-metadata.md diff --git a/_data/sidebars/user_docs.yml b/_data/sidebars/user_docs.yml index a367778..15796b3 100644 --- a/_data/sidebars/user_docs.yml +++ b/_data/sidebars/user_docs.yml @@ -31,6 +31,10 @@ entries: url: /docs-mount output: web, pdf + - title: Environment and Metadata + url: /docs-environment-metadata + output: web, pdf + - title: Change an Existing Container url: /docs-changing-containers output: web, pdf diff --git a/_includes/github_banner.html b/_includes/github_banner.html new file mode 100644 index 0000000..53c6b18 --- /dev/null +++ b/_includes/github_banner.html @@ -0,0 +1,6 @@ +Fork me on GitHub + diff --git a/_layouts/default.html b/_layouts/default.html index 3aa1c81..7052f0d 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,6 +1,7 @@ {% include head.html %} + {% include github_banner.html %} diff --git a/_layouts/default.html b/_layouts/default.html index 7052f0d..3aa1c81 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,7 +1,6 @@ {% include head.html %} - {% include github_banner.html %} diff --git a/_posts/recipes/2017-05-09-hostlibs-gpus-and-mpi.md b/_posts/recipes/2017-05-09-hostlibs-gpus-and-mpi.md new file mode 100644 index 0000000..9994a16 --- /dev/null +++ b/_posts/recipes/2017-05-09-hostlibs-gpus-and-mpi.md @@ -0,0 +1,68 @@ +--- +title: "Using Host libraries: GPU drivers and OpenMPI BTLs" +category: recipes +permalink: tutorial-gpu-drivers-open-mpi-mtls +--- + +Singularity does a fantastic job of isolating you from the host so you don't +have to muck about with `LD_LIBRARY_PATH`, you just get exactly the library +versions you want. However, in some situations you need to use library +versions that match host exactly. Two common ones are NVIDIA gpu +driver user-space libraries, and OpenMPI transport drivers for high performance +networking. There are many ways to solve these problems. Some people build a container and +copy the version of the libs (installed on the host) into the container. + +{% include toc.html %} + +## What We will learn today +This document describes how to use a bind mount, symlinks and ldconfig so that when the host +libraries are updated the container does not need to be rebuilt. + +**Note** this tutorial is tested with Singularity commit 945c6ee343a1e6101e22396a90dfdb5944f442b6, + which is part of the (current) development branch, and thus it should work with version 2.3 +when that is released. The version of OpenMPI used is 2.1.0 (versions above 2.1 should work). + +## Environment + +In our environment we run CentOS 7 hosts with: + + 1. slurm located on `/opt/slurm-` and the slurm user `slurm` + 2. Mellanox network cards with drivers installed to `/opt/mellanox` ( + Specifically we run a RoCEv1 network for Lustre and MPI communications) + 3. NVIDIA GPUs with drivers installed to `/lib64` + 4. OpenMPI (by default) for MPI processes + +## Creating your image +Since we are building an ubuntu image, it may be easier to create an ubuntu VM +to create the image. Alternatively you can follow the recipe + here. + +Use the following def file to create the image. + +{% include gist.html username='l1ll1' id='89b3f067d5b790ace6e6767be5ea2851' file='hostlibs.def' %} + +The mysterious `wget` line gets a list of all the libraries that the CentOS host +has in `/lib64` that *we* think its safe to use in the container. Specifically +these are things like nvidia drivers. + +{% include gist.html username='l1ll1' id='89b3f067d5b790ace6e6767be5ea2851' file='desired_hostlibs.txt' %} + +Also note: + +1. in `hostlibs.def` we create a slurm user. Obviously if your `SlurmUser` is different you should change this name. +2. We make directories for `/opt` and `/usr/local/openmpi`. We're going to bindmount these from the host so we get all the bits of OpenMPI and Mellanox and Slurm that we need. + + +## Executing your image +On our system we do: + +``` +SINGULARITYENV_LD_LIBRARY_PATH=/usr/local/openmpi/2.1.0-gcc4/lib:/opt/munge-0.5.11/lib:/opt/slurm-16.05.4/lib:/opt/slurm-16.05.4/lib/slurm:/desired_hostlibs:/opt/mellanox/mxm/lib/ +export SINGULARITYENV_LD_LIBRARY_PATH +``` + +then + +``` +srun singularity exec -B /usr/local/openmpi:/usr/local/openmpi -B /opt:/opt -B /lib64:/all_hostlibs hostlibs.img +``` diff --git a/pages/docs/admin-docs/docs-hpc.md b/pages/docs/admin-docs/docs-hpc.md index ec5f782..3e93e46 100644 --- a/pages/docs/admin-docs/docs-hpc.md +++ b/pages/docs/admin-docs/docs-hpc.md @@ -10,6 +10,7 @@ One of the architecturally defined features in Singularity is that it can execut Additionally, because Singularity is not emulating a full hardware level virtualization paradigm, there is no need to separate out any sandboxed networks or file systems because there is no concept of user-escalation within a container. Users can run Singularity containers just as they run any other program on the HPC resource. + ## Workflows We are in the process of developing Singularity Hub, which will allow for generation of workflows using Singularity containers in an online interface, and easy deployment on standard research clusters (e.g., SLURM, SGE). Currently, the Singularity core software is installed on the following research clusters, meaning you can run Singularity containers as part of your jobs: @@ -30,6 +31,10 @@ Another result of the Singularity architecture is the ability to properly integr Below are example snippets of building and installing OpenMPI into a container and then running an example MPI program through Singularity. +#### Tutorials + + - Using Host libraries: GPU drivers and OpenMPI BTLs + #### MPI Development Example diff --git a/pages/docs/contributing/contributing-docs.md b/pages/docs/contributing/contributing-docs.md index 677c990..a1ed109 100644 --- a/pages/docs/contributing/contributing-docs.md +++ b/pages/docs/contributing/contributing-docs.md @@ -66,9 +66,29 @@ Jekyll has this thing they call Markdown Syntax. All and any HTML tags are fair game as well! Once you add the post, if you have set the category correctly to "news" it should show up in the site feed. It's that easy! ## Contributing to a Page - All of the pages are in the pages folder, organized in a somewhat logical manner. If you want to edit content for a page, just edit the corresponding file. If you need to do something more advanced like edit a sidebar, you should look at the sidebar data yml documents, which render into the navigation. + +### Adding gists +You can embed a Github Gist directly in the page, and we encourage you to keep it under your username to maintain credit for the work. To reduce the additional gem dependencies, instead of using the official `gist include` we have our own wrapper for it that will turn this: + +```bash +{{ "{% include gist.html username='l1ll1' id='89b3f067d5b790ace6e6767be5ea2851' file='hostlibs.def'" }}%} +``` + +into this: + +{% include gist.html username='vsoch' id='49709c8ed549155d0a15bde48e893588' file='Singularity' %} + +We start with a url that looks like `https://gist.github.com/vsoch/49709c8ed549155d0a15bde48e893588`, under which there is a file called `Singularity`, and the variables are mapped as follows: + +- username: `vsoch` +- id: `49709c8ed549155d0a15bde48e893588` +- file: `Singularity` + +You can put this single line anywhere on the site, and it will render the gist automatically. + + ### Recording demos If you think something could be better explained with a demo, record and embed one! Here's how: From 63e86c6118d4fcd3c1a4c98a63be27f3fafa35e5 Mon Sep 17 00:00:00 2001 From: Chris Hines Date: Fri, 12 May 2017 11:58:41 +1000 Subject: [PATCH 20/30] Update based on additional info provided by Greg in the mailing list (#74) thread "mpi and portability" on 2017-05-11/12 --- pages/docs/admin-docs/docs-hpc.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pages/docs/admin-docs/docs-hpc.md b/pages/docs/admin-docs/docs-hpc.md index 3e93e46..bc4dc4e 100644 --- a/pages/docs/admin-docs/docs-hpc.md +++ b/pages/docs/admin-docs/docs-hpc.md @@ -16,9 +16,10 @@ We are in the process of developing Singularity Hub, which will allow for genera - The Sherlock cluster at Stanford University - SDSC Comet and Gordon (XSEDE) +- MASSIVE M1 M2 and M3 (Monash University and Australian National Merit Allocation Scheme) ### Integration with MPI -Another result of the Singularity architecture is the ability to properly integrate with the Message Passing Interface (MPI). Work has already been done for out of the box compatibility with Open MPI (both in Open MPI v2.x as well as part of Singularity). The Open MPI/Singularity workflow works as follows: +Another result of the Singularity architecture is the ability to properly integrate with the Message Passing Interface (MPI). Work has already been done for out of the box compatibility with Open MPI (both in Open MPI v2.1.x as well as part of Singularity). The Open MPI/Singularity workflow works as follows: 1. mpirun is called by the resource manager or the user directly from a shell 2. Open MPI then calls the process management daemon (ORTED) @@ -27,7 +28,9 @@ Another result of the Singularity architecture is the ability to properly integr 5. Singularity then launches the MPI application within the container 6. The MPI application launches and loads the Open MPI libraries 7. The Open MPI libraries connect back to the ORTED process via the Process Management Interface (PMI) - 8. At this point the processes within the container run as they would normally directly on the host at full bandwidth! This entire process happens behind the scenes, and from the user's perspective running via MPI is as simple as just calling mpirun on the host as they would normally. + 8. At this point the processes within the container run as they would normally directly on the host. + +This entire process happens behind the scenes, and from the user's perspective running via MPI is as simple as just calling mpirun on the host as they would normally. Below are example snippets of building and installing OpenMPI into a container and then running an example MPI program through Singularity. @@ -38,8 +41,14 @@ Below are example snippets of building and installing OpenMPI into a container a #### MPI Development Example -**What are supported Open MPI Version(s)?** -To achieve proper container'ized Open MPI support, you must use Open MPI version 2.1. Open MPI version 2.1.0 includes a bug in its configure script affecting some interfaces (at least Mellanox cards operating in RoCE mode using libmxm). For this reason, we show the example first. +**What are supported Open MPI Version(s)?** +To achieve proper container'ized Open MPI support, you should use Open MPI version 2.1. There are however three caveats: + 1. Open MPI 1.10.x *may* work but we expect you will need exactly matching version of PMI and Open MPI on both host and container (the 2.1 series should relax this requirement) + 2. Open MPI 2.1.0 has a bug affecting compilation of libraries for some interfaces (particularly Mellanox interfaces using libmxm are known to fail). If your in this situation you should use + the master branch of Open MPI rather than the release. + 3. Using Open MPI 2.1 does not magically allow your container to connect to networking fabric libraries in the host. If your cluster has, for example, an infiniband network you still need to install OFED libraries into the container. Alternatively you could bind mount both Open MPI and networking libraries into the container, but this could run afoul of glib compatibility issues (its generally OK if the container glibc is more recent than the host, but not the other way around) + +#### Code Example using Open MPI 2.1.0 Stable ```bash $ # Include the appropriate development tools into the container (notice we are calling @@ -51,10 +60,6 @@ $ wget https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.0.tar.b $ tar jtf openmpi-2.1.0.tar.bz2 $ cd openmpi-2.1.0 $ -$ # Build OpenMPI in the working directory, using the tool chain within the container -$ # This step is unusual in a stable release but there is a bug in the configure script -$ # affecting some interfaces -$ singularity exec /tmp/Centos-7.img ./autogen.pl $ singularity exec /tmp/Centos-7.img ./configure --prefix=/usr/local $ singularity exec /tmp/Centos-7.img make $ @@ -72,9 +77,9 @@ $ mpirun -np 20 singularity exec /tmp/Centos-7.img /usr/bin/ring ``` -#### Code Example +#### Code Example using Open MPI git master -The following example (using their master) should work fine on most hardware but if you have an issue, try running this example below: +The previous example (using the Open MPI 2.1.0 stable release) should work fine on most hardware but if you have an issue, try running the example below (using the Open MPI Master branch): ```bash $ # Include the appropriate development tools into the container (notice we are calling From 18fdecaa48afbfd4dcaba9d9a447c3713753dd34 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 18 May 2017 15:26:10 -0400 Subject: [PATCH 21/30] adding assicast and updating bootstrap docs --- .../docs-bootstrap-setup-vs-post.json | 3078 +++++++++++++++++ pages/docs/user-docs/docs-bootstrap-image.md | 244 +- pages/docs/user-docs/docs-bootstrap.md | 31 +- 3 files changed, 3257 insertions(+), 96 deletions(-) create mode 100644 assets/asciicast/docs-bootstrap-setup-vs-post.json diff --git a/assets/asciicast/docs-bootstrap-setup-vs-post.json b/assets/asciicast/docs-bootstrap-setup-vs-post.json new file mode 100644 index 0000000..2196fc4 --- /dev/null +++ b/assets/asciicast/docs-bootstrap-setup-vs-post.json @@ -0,0 +1,3078 @@ +{ + "command": null, + "height": 24, + "stdout": [ + [ + 0.441987, + "\u001b[?25h" + ], + [ + 0.00051, + "\u001b[0G\u001b[K" + ], + [ + 0.000158, + "\u001b[?25h" + ], + [ + 3.4e-05, + "\u001b[0G" + ], + [ + 1.7e-05, + "\u001b[K" + ], + [ + 0.021222, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 0.404511, + "H" + ], + [ + 0.092908, + "e" + ], + [ + 0.0764, + "r" + ], + [ + 0.086328, + "e" + ], + [ + 0.111684, + " " + ], + [ + 0.098468, + "w" + ], + [ + 0.054646, + "e" + ], + [ + 0.151172, + " " + ], + [ + 0.066724, + "a" + ], + [ + 0.071113, + "r" + ], + [ + 0.069541, + "e" + ], + [ + 0.083944, + " " + ], + [ + 0.070462, + "g" + ], + [ + 0.087215, + "o" + ], + [ + 0.148063, + "i" + ], + [ + 0.048299, + "n" + ], + [ + 0.075303, + "g" + ], + [ + 0.102688, + " " + ], + [ + 0.091353, + "t" + ], + [ + 0.087933, + "o" + ], + [ + 0.273702, + "t" + ], + [ + 0.094265, + "e" + ], + [ + 0.061173, + "s" + ], + [ + 0.271128, + "\b\u001b[K" + ], + [ + 0.173104, + "\b\u001b[K" + ], + [ + 0.133348, + "\b\u001b[K" + ], + [ + 0.276397, + " " + ], + [ + 0.085884, + "t" + ], + [ + 0.091596, + "e" + ], + [ + 0.044939, + "s" + ], + [ + 0.108552, + "t" + ], + [ + 0.034088, + " " + ], + [ + 0.154754, + "i" + ], + [ + 0.116403, + "f" + ], + [ + 0.111963, + " " + ], + [ + 0.321339, + "c" + ], + [ + 0.080546, + "o" + ], + [ + 0.101938, + "p" + ], + [ + 0.234218, + "y" + ], + [ + 0.165767, + "i" + ], + [ + 0.054234, + "n" + ], + [ + 0.07708, + "g" + ], + [ + 0.143019, + " " + ], + [ + 0.129395, + "a \r" + ], + [ + 0.129021, + " " + ], + [ + 0.075398, + "f" + ], + [ + 0.134027, + "i" + ], + [ + 0.087012, + "o" + ], + [ + 0.060953, + "e" + ], + [ + 0.30172, + " " + ], + [ + 0.244784, + "\b\u001b[K" + ], + [ + 0.140556, + "\b\u001b[K" + ], + [ + 0.149272, + "\b\u001b[K" + ], + [ + 0.180478, + "l" + ], + [ + 0.101592, + "e" + ], + [ + 0.109978, + " " + ], + [ + 0.815197, + "f" + ], + [ + 0.188886, + "r" + ], + [ + 0.079161, + "o" + ], + [ + 0.053774, + "m" + ], + [ + 0.309218, + " " + ], + [ + 0.415668, + "a" + ], + [ + 0.145187, + " " + ], + [ + 0.410038, + "r" + ], + [ + 0.069493, + "e" + ], + [ + 0.062753, + "l" + ], + [ + 0.109603, + "a" + ], + [ + 0.05339, + "t" + ], + [ + 0.077091, + "i" + ], + [ + 0.148762, + "v" + ], + [ + 0.069303, + "e" + ], + [ + 0.095898, + " " + ], + [ + 0.4594, + "p" + ], + [ + 0.169807, + "a" + ], + [ + 0.087991, + "t" + ], + [ + 0.076304, + "h" + ], + [ + 0.111822, + " " + ], + [ + 0.108523, + "o" + ], + [ + 0.077534, + "n" + ], + [ + 0.174151, + " " + ], + [ + 0.053894, + "t" + ], + [ + 0.067431, + "h" + ], + [ + 0.061733, + "e" + ], + [ + 0.095425, + " " + ], + [ + 0.202966, + "h" + ], + [ + 0.158227, + "o" + ], + [ + 0.068106, + "s" + ], + [ + 0.046876, + "t" + ], + [ + 0.079102, + " " + ], + [ + 0.106735, + "t" + ], + [ + 0.069684, + "o" + ], + [ + 0.127758, + " " + ], + [ + 0.551472, + "$" + ], + [ + 0.180148, + "S" + ], + [ + 0.103382, + "I" + ], + [ + 0.038316, + "N" + ], + [ + 0.077108, + "G" + ], + [ + 0.101093, + "U" + ], + [ + 0.173984, + "L" + ], + [ + 0.051754, + "A" + ], + [ + 0.063562, + "R" + ], + [ + 0.100841, + "I" + ], + [ + 0.084648, + "T" + ], + [ + 0.102026, + "Y" + ], + [ + 0.270103, + "_" + ], + [ + 0.155187, + "R" + ], + [ + 0.11899, + "O" + ], + [ + 0.157039, + "O" + ], + [ + 0.077085, + "T" + ], + [ + 0.268315, + "F" + ], + [ + 0.085496, + "S" + ], + [ + 0.197923, + " " + ], + [ + 0.169597, + "w" + ], + [ + 0.093649, + "o" + ], + [ + 0.080209, + "r" + ], + [ + 0.108639, + "k" + ], + [ + 0.036903, + "s" + ], + [ + 0.226234, + "!" + ], + [ + 0.120731, + " " + ], + [ + 0.18343, + "Q" + ], + [ + 0.637614, + "\b\u001b[K" + ], + [ + 0.192534, + "W" + ], + [ + 0.188536, + "e" + ], + [ + 0.056831, + " " + ], + [ + 0.115775, + "k" + ], + [ + 0.085764, + "n" + ], + [ + 0.087804, + "o" + ], + [ + 0.081871, + "w" + ], + [ + 0.128014, + " " + ], + [ + 0.052239, + "t" + ], + [ + 0.100972, + "h" + ], + [ + 0.02873, + "a \r" + ], + [ + 0.087123, + "t" + ], + [ + 0.052314, + " " + ], + [ + 0.149147, + "c" + ], + [ + 0.093616, + "o" + ], + [ + 0.073049, + "p" + ], + [ + 0.194376, + "y" + ], + [ + 0.181522, + "i" + ], + [ + 0.046243, + "n" + ], + [ + 0.084963, + "g" + ], + [ + 0.095407, + " " + ], + [ + 0.089571, + "a" + ], + [ + 0.064551, + "n" + ], + [ + 0.110734, + " " + ], + [ + 0.077882, + "a" + ], + [ + 0.177854, + "b" + ], + [ + 0.1169, + "s" + ], + [ + 0.048699, + "o" + ], + [ + 0.188615, + "l" + ], + [ + 0.139582, + "u" + ], + [ + 0.070231, + "t" + ], + [ + 0.054426, + "e" + ], + [ + 0.102357, + " " + ], + [ + 0.164642, + "p" + ], + [ + 0.067107, + "a" + ], + [ + 0.071506, + "t" + ], + [ + 0.100144, + "h" + ], + [ + 0.143846, + " " + ], + [ + 0.202389, + "d" + ], + [ + 0.094995, + "o" + ], + [ + 0.076576, + "e" + ], + [ + 0.06114, + "s" + ], + [ + 0.126946, + "." + ], + [ + 0.625625, + "^C\r\n" + ], + [ + 0.00087, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 0.655558, + "c" + ], + [ + 0.195121, + "a" + ], + [ + 0.095967, + "t" + ], + [ + 0.142927, + " " + ], + [ + 0.194357, + "S" + ], + [ + 0.124837, + "i" + ], + [ + 0.06175, + "n" + ], + [ + 0.173241, + "gularity " + ], + [ + 0.699071, + "\r\n" + ], + [ + 0.000906, + "Bootstrap: docker\r\nFrom: ubuntu:14.04\r\n\r\n%setup\r\n\r\necho $PWD\r\necho \"Copying hellokitty.sh to $SINGULARITY_ROOTFS\"\r\ncp hellokitty.sh $SINGULARITY_ROOTFS\r\n\r\n\r\n\r\n" + ], + [ + 2.1e-05, + "%runscript\r\n\r\n exec ls /\r\n" + ], + [ + 0.000337, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 2.212451, + "W" + ], + [ + 0.188501, + "e" + ], + [ + 0.08854, + " " + ], + [ + 0.06861, + "h" + ], + [ + 0.052428, + "a" + ], + [ + 0.093563, + "v" + ], + [ + 0.085785, + "e" + ], + [ + 0.064685, + " " + ], + [ + 0.13135, + "o" + ], + [ + 0.156153, + "u" + ], + [ + 0.046202, + "r" + ], + [ + 0.126928, + " " + ], + [ + 0.226436, + "f" + ], + [ + 0.110343, + "i" + ], + [ + 0.063566, + "l" + ], + [ + 0.067832, + "e" + ], + [ + 0.10934, + "," + ], + [ + 0.198584, + " " + ], + [ + 0.052658, + "h" + ], + [ + 0.068642, + "e" + ], + [ + 0.134286, + "l" + ], + [ + 0.165117, + "l" + ], + [ + 0.14976, + "o" + ], + [ + 0.197401, + "k" + ], + [ + 0.171548, + "i" + ], + [ + 0.053843, + "t" + ], + [ + 0.132302, + "t" + ], + [ + 0.09414, + "y" + ], + [ + 0.197893, + "." + ], + [ + 0.13249, + "s" + ], + [ + 0.117147, + "h" + ], + [ + 0.738672, + "," + ], + [ + 0.206938, + " " + ], + [ + 0.113184, + "a" + ], + [ + 0.05672, + "n" + ], + [ + 0.11566, + "d" + ], + [ + 0.064075, + " " + ], + [ + 0.097992, + "w \r" + ], + [ + 0.095854, + "i" + ], + [ + 0.158802, + "l" + ], + [ + 0.148243, + "l" + ], + [ + 0.165696, + " " + ], + [ + 0.106336, + "c" + ], + [ + 0.103447, + "o" + ], + [ + 0.078992, + "p" + ], + [ + 0.219438, + "y" + ], + [ + 0.181859, + " " + ], + [ + 0.107121, + "t" + ], + [ + 0.126646, + "o" + ], + [ + 0.595699, + " " + ], + [ + 0.099168, + "t" + ], + [ + 0.086004, + "h" + ], + [ + 0.101892, + "e" + ], + [ + 0.106334, + " " + ], + [ + 0.263073, + "r" + ], + [ + 0.07726, + "o" + ], + [ + 0.142776, + "o" + ], + [ + 0.045103, + "t" + ], + [ + 0.212367, + "f" + ], + [ + 0.069191, + "s" + ], + [ + 0.135405, + "." + ], + [ + 0.528105, + "^C\r\n" + ], + [ + 0.000587, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 0.488736, + "s" + ], + [ + 0.079349, + "u" + ], + [ + 0.092879, + "d" + ], + [ + 0.077183, + "o" + ], + [ + 0.136222, + " " + ], + [ + 0.043228, + "s" + ], + [ + 0.118162, + "i" + ], + [ + 0.054361, + "n" + ], + [ + 0.046484, + "g" + ], + [ + 0.115679, + "u" + ], + [ + 0.150192, + "l" + ], + [ + 0.035819, + "a" + ], + [ + 0.076803, + "r" + ], + [ + 0.079869, + "i" + ], + [ + 0.077533, + "t" + ], + [ + 0.108757, + "y" + ], + [ + 0.151651, + " " + ], + [ + 0.067075, + "c" + ], + [ + 0.188733, + "r" + ], + [ + 0.070189, + "e" + ], + [ + 0.163168, + "a" + ], + [ + 0.150585, + "t" + ], + [ + 0.093948, + "e" + ], + [ + 0.366562, + " " + ], + [ + 0.902348, + "t" + ], + [ + 0.190104, + "i" + ], + [ + 0.110132, + "c" + ], + [ + 0.274772, + "t" + ], + [ + 0.13985, + "a" + ], + [ + 0.101553, + "c" + ], + [ + 0.09644, + "." + ], + [ + 0.188403, + "i" + ], + [ + 0.062305, + "m" + ], + [ + 0.093487, + "g" + ], + [ + 0.765172, + "\b" + ], + [ + 0.666716, + "\b" + ], + [ + 0.500587, + "\b" + ], + [ + 0.030291, + "\b" + ], + [ + 0.030394, + "\b" + ], + [ + 0.102835, + "\r\n" + ], + [ + 0.00339, + "[sudo] password for vanessa: " + ], + [ + 2.141358, + "\r\n" + ], + [ + 0.010373, + "Initializing Singularity image subsystem\r\nOpening image file: tictac.img\r\n" + ], + [ + 2.7e-05, + "Creating 768MiB image\r\n" + ], + [ + 0.479944, + "Binding image to loop\r\n" + ], + [ + 0.000335, + "Creating file system within image\r\n" + ], + [ + 0.666371, + "s" + ], + [ + 0.063763, + "u" + ], + [ + 0.091534, + "d" + ], + [ + 0.111228, + "o" + ], + [ + 0.198713, + " " + ], + [ + 0.176957, + "s" + ], + [ + 0.087377, + "i" + ], + [ + 0.062283, + "n" + ], + [ + 0.037433, + "g" + ], + [ + 0.124767, + "u" + ], + [ + 0.150205, + "l" + ], + [ + 0.043737, + "a" + ], + [ + 0.077051, + "r" + ], + [ + 0.08771, + "i" + ], + [ + 0.076532, + "t" + ], + [ + 0.109918, + "y" + ], + [ + 0.151255, + " " + ], + [ + 0.060334, + "b" + ], + [ + 0.117951, + "o" + ], + [ + 0.180963, + "o" + ], + [ + 0.115742, + "t" + ], + [ + 0.275729, + "s" + ], + [ + 0.111286, + "t" + ], + [ + 0.035795, + "Image is done: tictac.img" + ], + [ + 4e-05, + "\r\n" + ], + [ + 0.000963, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 1.8e-05, + "s" + ], + [ + 1.3e-05, + "u" + ], + [ + 3.1e-05, + "d" + ], + [ + 2.6e-05, + "o" + ], + [ + 2.7e-05, + " " + ], + [ + 2.7e-05, + "s" + ], + [ + 2.8e-05, + "i" + ], + [ + 2.5e-05, + "n" + ], + [ + 2.6e-05, + "g" + ], + [ + 2.6e-05, + "u" + ], + [ + 2.6e-05, + "l" + ], + [ + 2.6e-05, + "a" + ], + [ + 2.7e-05, + "r" + ], + [ + 2.6e-05, + "i" + ], + [ + 2.7e-05, + "t" + ], + [ + 2.7e-05, + "y" + ], + [ + 2.7e-05, + " " + ], + [ + 2.7e-05, + "b" + ], + [ + 2.7e-05, + "o" + ], + [ + 3.1e-05, + "o" + ], + [ + 2.6e-05, + "t" + ], + [ + 2.8e-05, + "s" + ], + [ + 2.8e-05, + "t" + ], + [ + 0.143042, + "r" + ], + [ + 0.060935, + "a" + ], + [ + 0.120131, + "p" + ], + [ + 0.213128, + " " + ], + [ + 0.085659, + "t" + ], + [ + 0.123657, + "i" + ], + [ + 0.124091, + "c" + ], + [ + 0.209123, + "tac.img \r" + ], + [ + 0.780553, + " " + ], + [ + 0.152291, + "S" + ], + [ + 0.126251, + "i" + ], + [ + 0.046453, + "n" + ], + [ + 0.13732, + "gularity " + ], + [ + 1.006255, + "\r\n" + ], + [ + 0.00905, + "Building from bootstrap definition recipe\r\n" + ], + [ + 0.635563, + "Cache folder set to /root/.singularity/docker\r\n" + ], + [ + 2.3e-05, + "Extracting /root/.singularity/docker/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4.tar.gz\r\n" + ], + [ + 0.006026, + "Extracting /root/.singularity/docker/sha256:7d9dd91554882183cb5d1cd512479487e10f495c22d035a62fbb3ee38d89cf48.tar.gz\r\n" + ], + [ + 0.005466, + "Extracting /root/.singularity/docker/sha256:2e67a4d67b44968a2e2b40b1a22c6ad3192a9a490f1a47824f1309f8b97d30e5.tar.gz" + ], + [ + 6.5e-05, + "\r\n" + ], + [ + 0.003346, + "Extracting /root/.singularity/docker/sha256:46ec9927bb81d07ac2602292888b2c61213d51d1a4eeef6354fb9734246e52da.tar.gz" + ], + [ + 3.9e-05, + "\r\n" + ], + [ + 0.005364, + "Extracting /root/.singularity/docker/sha256:8ecd7f80d390b9e9a009363abea9fb2bb53e8104b4fc2f7abe00ee254005af1c.tar.gz\r\n" + ], + [ + 0.003946, + "Extracting /root/.singularity/docker/sha256:30d541b48fc05d2a1b2b0ac6a74f3df70e928c3edc253d5bce5dc6ae1fad55d2.tar.gz\r\n" + ], + [ + 1.652988, + "Adding Docker CMD as Singularity runscript...\r\n/bin/bash\r\n" + ], + [ + 0.007643, + "User defined %runscript found! Taking priority.\r\n" + ], + [ + 0.008052, + "+ " + ], + [ + 4.1e-05, + "echo" + ], + [ + 2.6e-05, + " /home/vanessa/Desktop" + ], + [ + 2.1e-05, + "\r\n" + ], + [ + 2.7e-05, + "/home/vanessa/Desktop" + ], + [ + 2e-05, + "\r\n" + ], + [ + 3.7e-05, + "+ echo Copying hellokitty.sh to /var/lib/singularity/mnt/source" + ], + [ + 1.9e-05, + "\r\nCopying hellokitty.sh to /var/lib/singularity/mnt/source\r\n+ cp hellokitty.sh" + ], + [ + 1.2e-05, + " /var/lib/singularity/mnt/source\r\n" + ], + [ + 0.45209, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 3.564879, + "y" + ], + [ + 0.06971, + "e" + ], + [ + 0.158545, + "p" + ], + [ + 0.144805, + "!" + ], + [ + 0.191991, + " " + ], + [ + 0.109437, + "W" + ], + [ + 0.218039, + "e" + ], + [ + 0.110828, + " " + ], + [ + 0.121803, + "e" + ], + [ + 0.094815, + "c" + ], + [ + 0.1174, + "h" + ], + [ + 0.06412, + "o" + ], + [ + 0.138088, + "e" + ], + [ + 0.085881, + "d" + ], + [ + 0.0963, + " " + ], + [ + 0.11409, + "t" + ], + [ + 0.077624, + "h" + ], + [ + 0.07026, + "e" + ], + [ + 0.064456, + " " + ], + [ + 0.504395, + "$" + ], + [ + 0.141798, + "P" + ], + [ + 0.091612, + "W" + ], + [ + 0.054201, + "D" + ], + [ + 0.140846, + "," + ], + [ + 0.190466, + " " + ], + [ + 0.074516, + "w" + ], + [ + 0.118656, + "h" + ], + [ + 0.165656, + "i" + ], + [ + 0.061518, + "c" + ], + [ + 0.15697, + "h" + ], + [ + 0.11131, + " " + ], + [ + 0.219197, + "i" + ], + [ + 0.077719, + "s" + ], + [ + 0.110687, + " " + ], + [ + 0.101643, + "m" + ], + [ + 0.23461, + "y" + ], + [ + 0.12743, + " " + ], + [ + 0.075633, + "d \r" + ], + [ + 0.045681, + "e" + ], + [ + 0.062515, + "s" + ], + [ + 0.070876, + "k" + ], + [ + 0.123429, + "t" + ], + [ + 0.086968, + "o" + ], + [ + 0.063563, + "p" + ], + [ + 0.178696, + "," + ], + [ + 0.190493, + " " + ], + [ + 0.098116, + "w" + ], + [ + 0.077578, + "h" + ], + [ + 0.167465, + "i" + ], + [ + 0.060859, + "c" + ], + [ + 0.141194, + "h" + ], + [ + 0.167193, + " " + ], + [ + 0.053112, + "i" + ], + [ + 0.043806, + "s" + ], + [ + 0.135886, + " " + ], + [ + 0.085933, + "w" + ], + [ + 0.083119, + "h" + ], + [ + 0.101462, + "e" + ], + [ + 0.068626, + "r" + ], + [ + 0.118505, + "e" + ], + [ + 0.151211, + " " + ], + [ + 0.101512, + "t" + ], + [ + 0.099343, + "h" + ], + [ + 0.101771, + "e" + ], + [ + 0.319501, + " " + ], + [ + 0.209204, + "f" + ], + [ + 0.110085, + "i" + ], + [ + 0.039614, + "l" + ], + [ + 0.114907, + "e" + ], + [ + 0.11991, + " " + ], + [ + 0.069138, + "i" + ], + [ + 0.051789, + "s" + ], + [ + 0.111763, + " " + ], + [ + 0.108424, + "l" + ], + [ + 0.141305, + "o" + ], + [ + 0.044828, + "c" + ], + [ + 0.09161, + "a" + ], + [ + 0.110971, + "t" + ], + [ + 0.092953, + "e" + ], + [ + 0.117454, + "d" + ], + [ + 0.080662, + " " + ], + [ + 0.08959, + "a" + ], + [ + 0.111274, + "n" + ], + [ + 0.069535, + "d" + ], + [ + 0.135253, + " " + ], + [ + 0.28913, + "w" + ], + [ + 0.164757, + "a" + ], + [ + 0.102293, + "s" + ], + [ + 0.034101, + " " + ], + [ + 0.105332, + "c" + ], + [ + 0.103467, + "o" + ], + [ + 0.071016, + "p" + ], + [ + 0.234964, + "i" + ], + [ + 0.06958, + "e" + ], + [ + 0.077238, + "d" + ], + [ + 0.087415, + " " + ], + [ + 0.114747, + "t" + ], + [ + 0.079162, + "o" + ], + [ + 0.118351, + " " + ], + [ + 0.061853, + "t" + ], + [ + 0.090829, + "h" + ], + [ + 0.054166, + "e" + ], + [ + 0.087389, + " " + ], + [ + 0.154723, + "r" + ], + [ + 0.150649, + "o" + ], + [ + 0.149177, + "o" + ], + [ + 0.045229, + "t" + ], + [ + 0.196346, + "f" + ], + [ + 0.085218, + "s" + ], + [ + 0.127801, + " " + ], + [ + 0.91992, + "u" + ], + [ + 0.062633, + "n" + ], + [ + 0.045357, + "d" + ], + [ + 0.099121, + "e" + ], + [ + 0.087772, + "r" + ], + [ + 0.084038, + " " + ], + [ + 0.133055, + "t" + ], + [ + 0.086105, + "h \r" + ], + [ + 0.084714, + "e" + ], + [ + 0.0644, + " " + ], + [ + 0.106847, + "v" + ], + [ + 0.343118, + "\b\u001b[K" + ], + [ + 0.252102, + "/" + ], + [ + 0.060312, + "v" + ], + [ + 0.170448, + "a" + ], + [ + 0.072077, + "r" + ], + [ + 0.142588, + "/" + ], + [ + 0.211947, + "l" + ], + [ + 0.212281, + "i" + ], + [ + 0.061744, + "b" + ], + [ + 0.198268, + "/" + ], + [ + 0.416766, + "s" + ], + [ + 0.071337, + "i" + ], + [ + 0.062066, + "n" + ], + [ + 0.054484, + "g" + ], + [ + 0.107721, + "u" + ], + [ + 0.150131, + "l" + ], + [ + 0.028301, + "a" + ], + [ + 0.047632, + "r" + ], + [ + 0.108499, + "i" + ], + [ + 0.076932, + "t" + ], + [ + 0.109474, + "y" + ], + [ + 0.532369, + "/" + ], + [ + 0.227348, + "m" + ], + [ + 0.214728, + "n" + ], + [ + 0.083941, + "t" + ], + [ + 0.229886, + "/" + ], + [ + 0.130237, + "s" + ], + [ + 0.11183, + "o" + ], + [ + 0.164146, + "u" + ], + [ + 0.062085, + "r" + ], + [ + 0.211198, + "c" + ], + [ + 0.054797, + "e" + ], + [ + 0.045943, + "s" + ], + [ + 0.126035, + "." + ], + [ + 0.520046, + "^C" + ], + [ + 6.5e-05, + "\r\n" + ], + [ + 0.000244, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 0.419195, + "L" + ], + [ + 0.339505, + "o" + ], + [ + 0.180552, + "o" + ], + [ + 0.054147, + "k" + ], + [ + 0.044771, + "s" + ], + [ + 0.15856, + " " + ], + [ + 0.132113, + "l" + ], + [ + 0.156638, + "i" + ], + [ + 0.165136, + "k" + ], + [ + 0.053832, + "e" + ], + [ + 0.126857, + " " + ], + [ + 0.077638, + "w" + ], + [ + 0.043462, + "e" + ], + [ + 0.108344, + " " + ], + [ + 0.072669, + "a" + ], + [ + 0.06821, + "r" + ], + [ + 0.068984, + "e" + ], + [ + 0.052944, + " " + ], + [ + 0.085706, + "g" + ], + [ + 0.094987, + "o" + ], + [ + 0.117306, + "o" + ], + [ + 0.060632, + "d" + ], + [ + 0.170172, + "!" + ], + [ + 0.115722, + " " + ], + [ + 0.159341, + "N" + ], + [ + 0.164456, + "o" + ], + [ + 0.053194, + "t" + ], + [ + 0.085036, + "e" + ], + [ + 0.079695, + " " + ], + [ + 0.09275, + "t" + ], + [ + 0.084099, + "h" + ], + [ + 0.045182, + "a" + ], + [ + 0.078671, + "t" + ], + [ + 0.056558, + " " + ], + [ + 0.288638, + "t" + ], + [ + 0.063162, + "h" + ], + [ + 0.181027, + "i" + ], + [ + 0.091788, + "s \r" + ], + [ + 0.072198, + " " + ], + [ + 0.069089, + "i" + ], + [ + 0.075761, + "s" + ], + [ + 0.088009, + " " + ], + [ + 0.271987, + "S" + ], + [ + 0.126373, + "i" + ], + [ + 0.046229, + "n" + ], + [ + 0.053513, + "g" + ], + [ + 0.108559, + "u" + ], + [ + 0.150912, + "l" + ], + [ + 0.035695, + "a" + ], + [ + 0.076234, + "r" + ], + [ + 0.08799, + "i" + ], + [ + 0.077028, + "t" + ], + [ + 0.1092, + "y" + ], + [ + 0.135367, + " " + ], + [ + 0.044269, + "v" + ], + [ + 0.123772, + "e" + ], + [ + 0.07897, + "r" + ], + [ + 0.130295, + "i" + ], + [ + 0.000494, + "s" + ], + [ + 0.04763, + "o" + ], + [ + 0.054096, + "n" + ], + [ + 0.212854, + " " + ], + [ + 0.061502, + "2" + ], + [ + 0.147871, + "." + ], + [ + 0.077692, + "3" + ], + [ + 0.172383, + "," + ], + [ + 0.564404, + " " + ], + [ + 0.419948, + "\b\u001b[K" + ], + [ + 0.501709, + "\b\u001b[K" + ], + [ + 0.029767, + "\b\u001b[K" + ], + [ + 0.029963, + "\b\u001b[K" + ], + [ + 0.030747, + "\b\u001b[K" + ], + [ + 0.029895, + "\b\u001b[K" + ], + [ + 0.029606, + "\b\u001b[K" + ], + [ + 0.030927, + "\b\u001b[K" + ], + [ + 0.030793, + "\b\u001b[K" + ], + [ + 0.031025, + "\b\u001b[K" + ], + [ + 0.315902, + "s" + ], + [ + 0.0855, + "i" + ], + [ + 0.049239, + "o" + ], + [ + 0.045776, + "n" + ], + [ + 0.197465, + " " + ], + [ + 0.113216, + "2" + ], + [ + 0.240857, + "." + ], + [ + 0.121927, + "3" + ], + [ + 0.492446, + "," + ], + [ + 0.182411, + " " + ], + [ + 0.074941, + "w" + ], + [ + 0.125909, + "h" + ], + [ + 0.071438, + "i" + ], + [ + 0.036221, + "c" + ], + [ + 0.157952, + "h" + ], + [ + 0.134834, + " " + ], + [ + 0.084365, + "i" + ], + [ + 0.028029, + "s" + ], + [ + 0.135899, + " " + ], + [ + 0.053421, + "c" + ], + [ + 0.107284, + "u" + ], + [ + 0.117895, + "r" + ], + [ + 0.155807, + "r" + ], + [ + 0.062187, + "e" + ], + [ + 0.054789, + "n" + ], + [ + 0.131799, + "t" + ], + [ + 0.085673, + "l" + ], + [ + 0.165398, + "y" + ], + [ + 0.143154, + " " + ], + [ + 0.124272, + "l" + ], + [ + 0.180781, + "i" + ], + [ + 0.045413, + "b" + ], + [ + 0.182005, + "-" + ], + [ + 0.060753, + "r" + ], + [ + 0.076936, + "e" + ], + [ + 0.132904, + "f" + ], + [ + 0.101799, + "a" + ], + [ + 0.093329, + "c" + ], + [ + 0.181232, + "t" + ], + [ + 0.09422, + "o" + ], + [ + 0.093861, + "r" + ], + [ + 0.102395, + " " + ], + [ + 0.162313, + "b" + ], + [ + 0.031341, + "r" + ], + [ + 0.067676, + "a" + ], + [ + 0.09425, + "n" + ], + [ + 0.076721, + "c" + ], + [ + 0.071544, + "h" + ], + [ + 0.188506, + "," + ], + [ + 0.166933, + " " + ], + [ + 0.154267, + "b" + ], + [ + 0.070992, + "u" + ], + [ + 0.031356, + "t" + ], + [ + 0.117943, + " " + ], + [ + 0.068099, + "t" + ], + [ + 0.085184, + "h" + ], + [ + 0.141699, + "i" + ], + [ + 0.068535, + "s" + ], + [ + 0.103959, + " " + ], + [ + 0.090096, + "s" + ], + [ + 0.103246, + "h \r" + ], + [ + 0.189362, + "o" + ], + [ + 0.084702, + "u" + ], + [ + 0.197598, + "l" + ], + [ + 0.091916, + "d" + ], + [ + 0.096423, + " " + ], + [ + 0.106648, + "b" + ], + [ + 0.1646, + "e" + ], + [ + 0.080591, + " " + ], + [ + 0.226241, + "t" + ], + [ + 0.085654, + "h" + ], + [ + 0.07812, + "e" + ], + [ + 0.055462, + " " + ], + [ + 0.117466, + "c" + ], + [ + 0.051047, + "a" + ], + [ + 0.07615, + "s" + ], + [ + 0.142115, + "e" + ], + [ + 0.0886, + " " + ], + [ + 0.121732, + "w" + ], + [ + 0.071572, + "i" + ], + [ + 0.069761, + "t" + ], + [ + 0.117196, + "h" + ], + [ + 0.056069, + " " + ], + [ + 0.096875, + "2" + ], + [ + 0.144268, + "." + ], + [ + 0.082819, + "2" + ], + [ + 0.142395, + " " + ], + [ + 0.43377, + "\b\u001b[K" + ], + [ + 0.284213, + " " + ], + [ + 0.089842, + "a" + ], + [ + 0.054823, + "s" + ], + [ + 0.088235, + " " + ], + [ + 0.090271, + "w" + ], + [ + 0.108941, + "e" + ], + [ + 0.025382, + "l" + ], + [ + 0.148443, + "l" + ], + [ + 0.165701, + "." + ], + [ + 0.475649, + " " + ], + [ + 0.201586, + "H" + ], + [ + 0.209197, + "v" + ], + [ + 0.070469, + "e" + ], + [ + 0.048423, + " " + ], + [ + 0.120752, + "a" + ], + [ + 0.312201, + "\b\u001b[K" + ], + [ + 0.157089, + "\b\u001b[K" + ], + [ + 0.156619, + "\b\u001b[K" + ], + [ + 0.157166, + "\b\u001b[K" + ], + [ + 0.050711, + "a" + ], + [ + 0.109844, + "v" + ], + [ + 0.054034, + "e" + ], + [ + 0.092687, + " " + ], + [ + 0.100457, + "a" + ], + [ + 0.089511, + " " + ], + [ + 0.105953, + "s" + ], + [ + 0.088298, + "p" + ], + [ + 0.236217, + "l" + ], + [ + 0.473364, + "e" + ], + [ + 0.181919, + "e" + ], + [ + 0.164876, + "e" + ], + [ + 0.164504, + "e" + ], + [ + 0.126133, + "n" + ], + [ + 0.077794, + "d" + ], + [ + 0.148344, + "e" + ], + [ + 0.086203, + "d" + ], + [ + 0.104711, + " " + ], + [ + 0.294499, + "S" + ], + [ + 0.204995, + "t" + ], + [ + 0.0954, + "." + ], + [ + 0.174426, + " " + ], + [ + 0.194558, + "P" + ], + [ + 0.085667, + "A" + ], + [ + 0.083306, + "t" + ], + [ + 0.148164, + "r" + ], + [ + 0.104444, + "i" + ], + [ + 0.082184, + "c" + ], + [ + 0.142516, + "k" + ], + [ + 0.2461, + "'" + ], + [ + 0.090978, + "s" + ], + [ + 0.152534, + " " + ], + [ + 0.144185, + "D" + ], + [ + 0.178974, + "a" + ], + [ + 0.103338, + "y" + ], + [ + 0.154264, + "!" + ], + [ + 0.661112, + "\r\n" + ], + [ + 0.000135, + "> " + ], + [ + 0.18481, + "^C" + ], + [ + 2.3e-05, + "\r\n" + ], + [ + 0.000295, + "\u001b]0;vanessa@vanessa-ThinkPad-T450s: ~/Desktop\u0007\u001b[01;32mvanessa@vanessa-ThinkPad-T450s\u001b[00m:\u001b[01;34m~/Desktop\u001b[00m$ " + ], + [ + 0.39479, + "e" + ], + [ + 0.172493, + "x" + ], + [ + 0.063697, + "i" + ], + [ + 0.148155, + "t" + ], + [ + 0.151566, + "\r\n" + ] + ], + "env": { + "SHELL": "/bin/bash", + "TERM": "xterm" + }, + "duration": 108.516514, + "title": null, + "version": 1, + "width": 80 +} \ No newline at end of file diff --git a/pages/docs/user-docs/docs-bootstrap-image.md b/pages/docs/user-docs/docs-bootstrap-image.md index 09254a1..bfd2e55 100644 --- a/pages/docs/user-docs/docs-bootstrap-image.md +++ b/pages/docs/user-docs/docs-bootstrap-image.md @@ -1,107 +1,205 @@ --- title: Getting Started with Bootstrap sidebar: user_docs -permalink: docs-bootstrap +permalink: bootstrap-image folder: docs --- ## Bootstrapping a Container -Bootstrapping is the process where we install an operating system and then configure it appropriately for a specified need. To do this we use a bootstrap definition file which is a recipe of how to specifically build the container and explained in detail in the previous section. +Bootstrapping is the process where we install an operating system and then configure it appropriately for a specified need. To do this we use a bootstrap definition file (a text file called `Singularity`) which is a recipe of how to specifically build the container. Here we will overview the sections, best practices, and a quick example. -For the purpose of this example, we will use the portions of the bootstrap definition file above, and assemble it into a complete definition file: +{% include toc.html %} + +## Quick Start +Too long... didn't read! If you want the quickest way to run bootstrap, here is the usage: + +```bash +$ singularity bootstrap +USAGE: singularity [...] bootstrap +``` + +The `` is the path to the Singularity image file, and the `` is the location of the definition file (the recipe) we will use to create this container. The process of building a container should always be done by root so that the correct file ownership and permissions are maintained. Also, so installation programs check to ensure they are the root user before proceeding. The bootstrap process may take anywhere from one minute to one hour depending on what needs to be done and how fast your network connection is. + + +Let's continue with our quick start example. Here is your spec file, `Singularity`, + + +```bash +Bootstrap:docker +From:ubuntu:latest +``` + +You next create an image: + +```bash +$ singularity create ubuntu.img +Initializing Singularity image subsystem +Opening image file: ubuntu.img +Creating 768MiB image +Binding image to loop +Creating file system within image +Image is done: ubuntu.img +``` + +and finally run the bootstrap command, pointing to your image (``) and the file `Singularity` (``). + +```bash +$ sudo singularity bootstrap ubuntu.img Singularity +Sanitizing environment +Building from bootstrap definition recipe +Adding base Singularity environment to container +Docker image path: index.docker.io/library/ubuntu:latest +Cache folder set to /root/.singularity/docker +[5/5] |===================================| 100.0% +Exploding layer: sha256:b6f892c0043b37bd1834a4a1b7d68fe6421c6acbc7e7e63a4527e1d379f92c1b.tar.gz +Exploding layer: sha256:55010f332b047687e081a9639fac04918552c144bc2da4edb3422ce8efcc1fb1.tar.gz +Exploding layer: sha256:2955fb827c947b782af190a759805d229cfebc75978dba2d01b4a59e6a333845.tar.gz +Exploding layer: sha256:3deef3fcbd3072b45771bd0d192d4e5ff2b7310b99ea92bce062e01097953505.tar.gz +Exploding layer: sha256:cf9722e506aada1109f5c00a9ba542a81c9e109606c01c81f5991b1f93de7b66.tar.gz +Exploding layer: sha256:fe44851d529f465f9aa107b32351c8a0a722fc0619a2a7c22b058084fac068a4.tar.gz +Finalizing Singularity container +``` + +Notice that bootstrap does require sudo. If you do an import, with a docker uri for example, you would see a similar flow, but the calling user would be you, and the cache your `$HOME`. + +```bash +$singularity create ubuntu.img +singularity import ubuntu.img docker://ubuntu:latest +Docker image path: index.docker.io/library/ubuntu:latest +Cache folder set to /home/vanessa/.singularity/docker +Importing: base Singularity environment +Importing: /home/vanessa/.singularity/docker/sha256:b6f892c0043b37bd1834a4a1b7d68fe6421c6acbc7e7e63a4527e1d379f92c1b.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:55010f332b047687e081a9639fac04918552c144bc2da4edb3422ce8efcc1fb1.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:2955fb827c947b782af190a759805d229cfebc75978dba2d01b4a59e6a333845.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:3deef3fcbd3072b45771bd0d192d4e5ff2b7310b99ea92bce062e01097953505.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:cf9722e506aada1109f5c00a9ba542a81c9e109606c01c81f5991b1f93de7b66.tar.gz +Importing: /home/vanessa/.singularity/metadata/sha256:fe44851d529f465f9aa107b32351c8a0a722fc0619a2a7c22b058084fac068a4.tar.gz +``` + + +## Best Practices for Bootstrapping +When bootstrapping a container, it is best to consider the following: + +1. Install packages, programs, data, and files into operating system locations (e.g. not `/home`, `/tmp`, or any other directories that might get commonly binded on). +2. If you require any special environment variables to be defined, add them the `/environment` file inside the container. +3. Files should never be owned by actual users, they should always be owned by a system account (UID < 500). +4. Ensure that the container's `/etc/passwd`, `/etc/group`, `/etc/shadow`, and no other sensitive files have anything but the bare essentials within them. +5. Do all of your bootstrapping via a definition file instead of manipulating the containers by hand (with the `--writable` options), this ensures greatest possibility of reproducibility and mitigates the *black box effect*. + + + +## The Bootstrap Definition File +There are multiple sections of the Singularity bootstrap definition file: + +1. **Header**: The Header describes the core operating system to bootstrap within the container. Here you will configure the base operating system features that you need within your container. Examples of this include, what distribution of Linux, what version, what packages must be part of a core install. +2. **Sections**: The rest of the definition is comprised of sections or blobs of data. Each section is defined by a `%` character followed by the name of the particular section. All sections are optional. + + +### Header +The header is at the top of the file, and tells Singularity the kind of bootstrap, and from where. For example, a very minimal Docker bootstrap might look like this: + + +```bash +Bootstrap: docker +From: ubuntu:latest ``` -# Bootstrap definition example for Centos-7 with the latest Open MPI from GitHub master +a Bootstrap that uses a mirror to install Centos-7 might look like this: + + +```bash BootStrap: yum OSVersion: 7 MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/ Include: yum +``` + +For complete details about header fields that are allowed, please see the Bootstrap Command. We will continue here with higher level overview. + + +### Sections +The main content of the bootstrap file is broken into sections. + +#### %setup +Setup is where you might perform actions on the host before we move into the container. For versions earlier than 2.3, you would copy files from your host to `$SINGULARITY_ROOTFS` to move them into the container. For 2.3 and later, we recommend you use `%files`. We can see the difference between `%setup` and `%post` in the following asciicast: + +{% include asciicast.html source='docs-bootstrap-setup-vs-post.json' title='How does the container see setup vs post?' author='vsochat@stanford.edu'%} + +In the above, we see that copying something to `$SINGULARITY_ROOTFS` during `%setup` was successful to move the file into the container, but copying during `%post` was not. + +#### %files +Speaking of files, if you want to copy content into the container, you should do so using the `%files` section, where each is a pair of `` and ``, where the file or expression to be copied is a path on your host, and the destination is a path in the container. Here we are using the traditional `cp` command, so the same conventions apply. + +#### %labels +To store metadata with your container, you can add them to the `%labels` section. They will be stored in a file `/.singularity.d/labels.json` as metadata with your container. The general format is a `LABELNAME` followed by a `LABELVALUE`. Labels from Docker bootstraps will be carried forward here. As an example: + +```bash +%labels +Maintainer vsochat@stanford.edu +Version 2.0 +``` + +#### %environment +Akin to labels, you can add pairs of `VARIABLE` and `VALUE` under environment to be sourced when the container is used as variables in the environment. The entire section is written to a file that gets sourced, so you should generally use the same conventions that you might use in a `bashrc` or `profile`. See Environment and Metadata for more information about these two sections. -%setup - echo "Looking in directory '$SINGULARITY_ROOTFS' for /bin/sh" - if [ ! -x "$SINGULARITY_ROOTFS/bin/sh" ]; then - echo "Hrmm, this container does not have /bin/sh installed..." - exit 1 - fi - exit 0 +#### %post +This scriptlet will be run from inside the container. This is where the guts of your setup will live, including making directories, and installing software and libraries. For example, here we are installing yum, openMPI, and other dependencies for a Centos7 bootstrap: + +```bash %post - echo "Installing Development Tools YUM group" - yum -y groupinstall "Development Tools" - echo "Installing OpenMPI into container..." - mkdir /tmp/git - cd /tmp/git - git clone https://github.com/open-mpi/ompi.git - cd ompi - ./autogen.pl - ./configure --prefix=/usr/local - make - make install - /usr/local/bin/mpicc examples/ring_c.c -o /usr/bin/mpi_ring - cd / - rm -rf /tmp/git - exit 0 + echo "Installing Development Tools YUM group" + yum -y groupinstall "Development Tools" + echo "Installing OpenMPI into container..." -%runscript - echo "Arguments received: $*" - exec /usr/bin/python "$@" + # Here we are at the base, /, of the container + git clone https://github.com/open-mpi/ompi.git -%test - /usr/local/bin/mpirun --allow-run-as-root /usr/bin/mpi_ring + # Now at /ompi + cd ompi + ./autogen.pl + ./configure --prefix=/usr/local + make + make install + /usr/local/bin/mpicc examples/ring_c.c -o /usr/bin/mpi_ring ``` -Taking this particular definition file as the example, we can use this to create our container. +You cannot copy files from the host to your container in this section, but you can of course download with commands like `git clone` and `wget` and `curl`. + -The Singularity bootstrap command syntax is as follows: +#### %runscript +The `%runscript` is another scriptlet, but it does not get executed during bootstrapping. Instead it gets persisted within the container to a file called `/singularity` which is the execution driver when the container image is ***run*** (either via the `singularity run` command or via executing the container directly). + +When the `%runscript` is executed, all options are passed along to the executing script at runtime, this means that you can (and should) manage argument processing from within your runscript. Here is an example of how to do that: ```bash -$ singularity bootstrap -USAGE: singularity [...] bootstrap +%runscript + echo "Arguments received: $*" + exec /usr/bin/python "$@" ``` -The `` is the path to the Singularity image file, and the `` is the location of the definition file (the recipe) we will use to create this container. The process of building a container should always be done by root so that the correct file ownership and permissions are maintained. Also, so installation programs check to ensure they are the root user before proceeding. The bootstrap process may take anywhere from one minute to one hour depending on what needs to be done and how fast your network connection is. +In this particular runscript, the arguments are printed as a single string (`$*`) and then they are passed to `/usr/bin/python` via a quoted array (`$@`) which ensures that all of the arguments are properly parsed by the executed command. The `exec` command causes the given command to replace the current entry in the process table with the one that is to be called. This makes it so the runscript shell process ceases to exist, and the only process running inside this container is the called Python command. + +#### %test +You may choose to add a `%test` section to your definition file. This section will be run at the very end of the boostrapping process and will give you a chance to validate the container during the bootstrap process. You can also execute this scriptlet through the container itself, such that you can always test the validity of the container itself as you transport it to different hosts. Extending on the above Open MPI `%post`, consider this example: + +```bash +%test + /usr/local/bin/mpirun --allow-run-as-root /usr/bin/mpi_test +``` -Here are the steps necessary to create a container using the above definition file: +This is a simple Open MPI test to ensure that the MPI is build properly and communicates between processes as it should. + +If you want to bootstrap without running tests, you can do so with the `--notest` argument: ```bash -$ sudo singularity create --size 2048 /tmp/Centos7-ompi.img -Creating a new image with a maximum size of 2048MiB... -Executing image create helper -Formatting image with ext3 file system -Done. -$ sudo singularity bootstrap /tmp/Centos7-ompi.img centos7-ompi_master.def -Bootstrap initialization -Checking bootstrap definition -Executing Prebootstrap module -Executing Bootstrap 'yum' module - -... - -+ /usr/local/bin/mpicc examples/ring_c.c -o /usr/bin/mpi_ring -+ cd / -+ rm -rf /tmp/git -+ exit 0 -+ /usr/local/bin/mpirun --allow-run-as-root /usr/bin/mpi_ring -Process 0 sending 10 to 1, tag 201 (4 processes in ring) -Process 0 sent to 1 -Process 0 decremented value: 9 -Process 0 decremented value: 8 -Process 0 decremented value: 7 -Process 0 decremented value: 6 -Process 0 decremented value: 5 -Process 0 decremented value: 4 -Process 0 decremented value: 3 -Process 0 decremented value: 2 -Process 0 decremented value: 1 -Process 0 decremented value: 0 -Process 0 exiting -Process 1 exiting -Process 2 exiting -Process 3 exiting +$ sudo singularity bootstrap --notest container.img Singularity ``` -You can see from the output above, that the container has been built and the `%test` section has executed as expected. Our container has now been bootstrapped. +This argument might be useful in cases where you might need hardware that is available during runtime, but is not available on the host that is building the image. + -
For more examples we recommend that you look at the examples folder for the most up-to-date examples. +## Examples +For more examples, we recommend you look at other containers on Singularity Hub. For more examples we recommend that you look at the examples folder for the most up-to-date examples. diff --git a/pages/docs/user-docs/docs-bootstrap.md b/pages/docs/user-docs/docs-bootstrap.md index 77c752e..1a21628 100644 --- a/pages/docs/user-docs/docs-bootstrap.md +++ b/pages/docs/user-docs/docs-bootstrap.md @@ -1,34 +1,18 @@ --- title: The Bootstrap Definition sidebar: user_docs -permalink: bootstrap-image +permalink: docs-bootstrap toc: false folder: docs --- {% include toc.html %} -The process of *bootstrapping* a Singularity container is equivalent to describing a recipe for the container creation. There are several recipe formats that Singularity supports, but only the primary format of version 2.2 will be documented here. +The process of *bootstrapping* a Singularity container is equivalent to describing a recipe for the container creation. There are several recipe formats that Singularity supports, but only the primary format of version 2.3 will be documented here. If you want a general overview with examples, see Bootstrapping an Image. The detailed options for each of the header and sections are provided here. -## Best Practices for Bootstrapping -When bootstrapping a container, it is best to consider the following: +## The header fields: -1. Install packages, programs, data, and files into operating system locations (e.g. not `/home`, `/tmp`, or any other directories that might get commonly binded on). -2. If you require any special environment variables to be defined, add them the `/environment` file inside the container. -3. Files should never be owned by actual users, they should always be owned by a system account (UID < 500). -4. Ensure that the container's `/etc/passwd`, `/etc/group`, `/etc/shadow`, and no other sensitive files have anything but the bare essentials within them. -5. Do all of your bootstrapping via a definition file instead of manipulating the containers by hand (with the `--writable` options), this ensures greatest possibility of reproducibility and mitigates the *black box effect*. - - -## The Bootstrap Definition File -There are multiple sections of the Singularity bootstrap definition file: - -1. **Header**: The Header describes the core operating system to bootstrap within the container. Here you will configure the base operating system features that you need within your container. Examples of this include, what distribution of Linux, what version, what packages must be part of a core install. -2. **Sections**: The reset of the definition is comprised of sections or blobs of data. Each section is defined by a `%` character followed by the name of the particular section. All sections are optional. - -### The header fields: - -#### Bootstrap: +### Bootstrap: The `Bootstrap: ` keyword identifies the Singularity module that will be used for building the core components of the operating system. There are several supported modules at the time of this writing: ##### **yum** @@ -60,8 +44,9 @@ The Docker bootstrap module will create a core operating system image based on a - **Token**: Sometimes the Docker API (depending on version?) requires an authorization token which is generated on the fly. Toggle this with a `yes` or `no` here. -### Bootstrap sections: -Once the `Bootstrap` module has completed, the sections are identified and utilized if present. The following sections are supported in the bootstrap definition, and integrated during the bootstrap process in the following order: +## Bootstrap sections: +Once the `Bootstrap` module has completed, the sections are identified and utilized if present. The following sections are supported in the bootstrap definition, and integrated during the bootstrap process: + #### %setup This section blob is a Bourne shell scriptlet which will be executed on the host outside the container during bootstrap. The path to the container is accessible from within the running scriptlet environment via the variable `$SINGULARITY_ROOTFS`. For example, consider the following scriptlet: @@ -76,7 +61,7 @@ This section blob is a Bourne shell scriptlet which will be executed on the host exit 0 ``` -As we investigate this example scriptlet, you will first see this is the `%outside` scriptlet as would be defined within our bootstrap. The following line simply echos a message and prints the variable `$SINGULARITY_ROOTFS` which is defined within the shell context that this scriptlet runs in. Then we check to see if `/bin/sh` is executable, and if it is not, we print an error message. Notice the `exit 1`. The exit value of the scriptlets communicates if the scriptlet ran successfully or not. As with any shell return value, an exit of 0 (zero) means success, and any other exit value is a failure. +As we investigate this example scriptlet, you will first see this is the outside scriptlet as would be defined within our bootstrap. The following line simply echos a message and prints the variable `$SINGULARITY_ROOTFS` which is defined within the shell context that this scriptlet runs in. Then we check to see if `/bin/sh` is executable, and if it is not, we print an error message. Notice the `exit 1`. The exit value of the scriptlets communicates if the scriptlet ran successfully or not. As with any shell return value, an exit of 0 (zero) means success, and any other exit value is a failure. *note: Any uncaught command errors that occur within the scriptlet will cause the entire build process to halt!* From 6f2a78c70a24dbe68620a8df686b7b56e57547c0 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 18 May 2017 15:29:16 -0400 Subject: [PATCH 22/30] release is in wrong folder --- _posts/{ => releases}/2017-02-14-release-2-2-1.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _posts/{ => releases}/2017-02-14-release-2-2-1.md (100%) diff --git a/_posts/2017-02-14-release-2-2-1.md b/_posts/releases/2017-02-14-release-2-2-1.md similarity index 100% rename from _posts/2017-02-14-release-2-2-1.md rename to _posts/releases/2017-02-14-release-2-2-1.md From 98b722f44da2da9c1cba248f564df38e2fd2f28b Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 19 May 2017 17:02:43 -0400 Subject: [PATCH 23/30] fixing bug with environment variable spec --- pages/docs/user-docs/docs-environment-metadata.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/docs/user-docs/docs-environment-metadata.md b/pages/docs/user-docs/docs-environment-metadata.md index 4a3d0d0..d0fdde8 100644 --- a/pages/docs/user-docs/docs-environment-metadata.md +++ b/pages/docs/user-docs/docs-environment-metadata.md @@ -18,7 +18,7 @@ Bootstrap:docker From: ubuntu:latest %environment -VARIABLE_NAME VARIABLE_VALUE +VARIABLE_NAME=VARIABLE_VALUE ``` Forget something, or need a variable defined at runtime? You can set any variable you want inside the container by prefixing it with "SINGULARITYENV_". It will be transposed automatically and the prefix will be stripped. For example, let's say we want to set the variable `HELLO` to have value `WORLD`. We can do that as follows: @@ -62,7 +62,12 @@ Your container stores metadata about it's build, along with Docker labels. You c ```bash singularity exec centos7.img cat /.singularity.d/labels.json -{"name": "CentOS Base Image", "build-date": "20170315", "vendor": "CentOS", "license": "GPLv2"} +{ "name": + "CentOS Base Image", + "build-date": "20170315", + "vendor": "CentOS", + "license": "GPLv2" +} ``` You can add custom labels to your container in a bootstrap file: From fba0af1709da0cd4c2fc224704f0dd3fd34cf302 Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 19 May 2017 19:29:50 -0400 Subject: [PATCH 24/30] adding pull page --- _data/sidebars/user_docs.yml | 8 +- pages/docs/user-docs/docs-pull.md | 134 ++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 pages/docs/user-docs/docs-pull.md diff --git a/_data/sidebars/user_docs.yml b/_data/sidebars/user_docs.yml index 29fab9e..a8accd6 100644 --- a/_data/sidebars/user_docs.yml +++ b/_data/sidebars/user_docs.yml @@ -75,10 +75,14 @@ entries: url: /docs-import output: web, pdf - - title: shell - url: /docs-shell + - title: pull + url: /docs-pull output: web, pdf - title: run url: /docs-run output: web, pdf + + - title: shell + url: /docs-shell + output: web, pdf diff --git a/pages/docs/user-docs/docs-pull.md b/pages/docs/user-docs/docs-pull.md new file mode 100644 index 0000000..637613d --- /dev/null +++ b/pages/docs/user-docs/docs-pull.md @@ -0,0 +1,134 @@ +--- +title: Singularity Pull +sidebar: user_docs +permalink: docs-pull +folder: docs +toc: false +--- + +Singularity `pull` is the command that you would want to use to communicate with a container registry. The command does exactly as it says - there exists an image external to my host, and I want to pull it here. We currently support pull for both Docker and Singularity Hub images, and will review usage for both. + + +## Singularity Hub +Singularity differs from Docker in that we serve entire images, as opposed to layers. This means that pulling a Singularity Hub means downloading the entire (compressed) container file, and then having it extract on your local machine. The basic command is the following: + +``` +singularity pull shub://vsoch/hello-world +Progress |===================================| 100.0% +Done. Container is at: ./vsoch-hello-world-master.img +``` + + +### How do tags work? +On Singularity Hub, a `tag` coincide with a branch. So if you have a repo called `vsoch/hello-world`, by default the file called `Singularity` (your build recipe file) will be looked for in the base of the master branch. The command that we issued above would be equivalent to doing: + +``` +singularity pull shub://vsoch/hello-world:master +``` + +To enable other branches to build, they must be turned on in your collection (more details are available in the Singularity Hub docs). If you then put another `Singularity` file in a branch called development, you would pull it as follows: + +``` +singularity pull shub://vsoch/hello-world:development +``` + +The term `latest` in Singularity Hub will pull, across all of your branches, the most recent image. If `development` is more recent than `master`, it would be pulled, for example. + +### Image Names +As you can see, since we didn't specify anything special, the default naming convention is to use the username, reponame, and the branch (tag). You have three options for changing this: + +``` +PULL OPTIONS: + -n/--name Specify a custom container name (first priority) + -C/--commit Name container based on Github commit (second priority) + -H/--hash Name container based on file hash (second priority) +``` + +### Custom Name + +``` +singularity pull --name meatballs.img shub://vsoch/hello-world +Progress |===================================| 100.0% +Done. Container is at: ./meatballs.img +``` + +### Name by commit +Each container build on Singularity Hub is associated with the Github commit of the repo that was used to build it. You can specify to name your container based on the commit with the `--commit` flag, if, for example, you want to match containers to their build files: + +``` +singularity pull --commit shub://vsoch/hello-world +Progress |===================================| 100.0% +Done. Container is at: ./4187993b8b44cbfa51c7e38e6b527918fcdf0470.img +``` + +### Name by hash +If you prefer the hash of the file itself, you can do that too. + +``` +singularity pull --hash shub://vsoch/hello-world +Progress |===================================| 100.0% +Done. Container is at: ./4db5b0723cfd378e332fa4806dd79e31.img +``` + +### Pull to different folder +For any of the above, if you want to specify a different folder for your image, you can define the variable `SINGULARITY_PULLFOLDER`. By default, we will first check if you have the `SINGULARITY_CACHEDIR` defined, and pull images there. If not, we look for `SINGULARITY_PULLFOLDER`. If neither of these are defined, the image is pulled to the present working directory, as we showed above. Here is an example of pulling to `/tmp`. + +``` +SINGULARITY_PULLFOLDER=/tmp +singularity pull shub://vsoch/hello-world +Progress |===================================| 100.0% +Done. Container is at: /tmp/vsoch-hello-world-master.img +``` + +## Docker +Docker pull is similar (on the surface) to a Singularity Hub pull, and we would do the following: + + +``` +singularity pull docker://ubuntu +Initializing Singularity image subsystem +Opening image file: ubuntu.img +Creating 223MiB image +Binding image to loop +Creating file system within image +Image is done: ubuntu.img +Docker image path: index.docker.io/library/ubuntu:latest +Cache folder set to /home/vanessa/.singularity/docker +Importing: base Singularity environment +Importing: /home/vanessa/.singularity/docker/sha256:b6f892c0043b37bd1834a4a1b7d68fe6421c6acbc7e7e63a4527e1d379f92c1b.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:55010f332b047687e081a9639fac04918552c144bc2da4edb3422ce8efcc1fb1.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:2955fb827c947b782af190a759805d229cfebc75978dba2d01b4a59e6a333845.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:3deef3fcbd3072b45771bd0d192d4e5ff2b7310b99ea92bce062e01097953505.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:cf9722e506aada1109f5c00a9ba542a81c9e109606c01c81f5991b1f93de7b66.tar.gz +Importing: /home/vanessa/.singularity/metadata/sha256:fe44851d529f465f9aa107b32351c8a0a722fc0619a2a7c22b058084fac068a4.tar.gz +Done. Container is at: ubuntu.img +``` + +If you specify the tag, the image would be named accordingly (eg, `ubuntu-latest.img`). Did you notice that the output looks similar to if we did the following? + +``` +singularity create ubuntu.img +singularity import ubuntu.img docker://ubuntu +``` + +this is because the same logic is happening on the back end. Thus, the pull command with a docker uri also supports arguments `--size` and `--name` Here is how I would pull an ubuntu image, but make it bigger, and name it something else. + +``` +singularity pull --size 2000 --name jellybelly.img docker://ubuntu +Initializing Singularity image subsystem +Opening image file: jellybelly.img +Creating 2000MiB image +Binding image to loop +Creating file system within image +Image is done: jellybelly.img +Docker image path: index.docker.io/library/ubuntu:latest +Cache folder set to /home/vanessa/.singularity/docker +Importing: base Singularity environment +Importing: /home/vanessa/.singularity/docker/sha256:b6f892c0043b37bd1834a4a1b7d68fe6421c6acbc7e7e63a4527e1d379f92c1b.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:55010f332b047687e081a9639fac04918552c144bc2da4edb3422ce8efcc1fb1.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:2955fb827c947b782af190a759805d229cfebc75978dba2d01b4a59e6a333845.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:3deef3fcbd3072b45771bd0d192d4e5ff2b7310b99ea92bce062e01097953505.tar.gz +Importing: /home/vanessa/.singularity/docker/sha256:cf9722e506aada1109f5c00a9ba542a81c9e109606c01c81f5991b1f93de7b66.tar.gz +Importing: /home/vanessa/.singularity/metadata/sha256:fe44851d529f465f9aa107b32351c8a0a722fc0619a2a7c22b058084fac068a4.tar.gz +Done. Container is at: jellybelly.img +``` From 99071873ca3be03f388f6d93d2ab0f42f54e59a0 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 25 May 2017 21:06:41 -0400 Subject: [PATCH 25/30] updating docs to use ubuntu xenial instead of trusty --- pages/docs/install/install-mac.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/docs/install/install-mac.md b/pages/docs/install/install-mac.md index a6a5457..906d71c 100644 --- a/pages/docs/install/install-mac.md +++ b/pages/docs/install/install-mac.md @@ -17,10 +17,10 @@ brew cask install vagrant brew cask install vagrant-manager # Create a working directory for the Vagrant configuration and -# generate a template Vagrantfile for "ubuntu/trusty64" +# generate a template Vagrantfile for "ubuntu/xenial64" mkdir singularity-vm cd singularity-vm -vagrant init ubuntu/trusty64 +vagrant init ubuntu/xenial64 # Build and start the Vagrant hosted VM vagrant up --provider virtualbox From 5af531ccd437b03430d31effb95fa2ccdb290e39 Mon Sep 17 00:00:00 2001 From: Alain Domissy Date: Fri, 26 May 2017 21:36:45 -0700 Subject: [PATCH 26/30] start from vagrant box bento/ubuntu-16.04 (#80) * start from bento/ubuntu-16.04 Replacing the initial vagrant box from "ubuntu/trusty64" with "ubuntu/xenial64" was a great move : - xenial is the latest ubuntu long term support release, - also this avoids an issue which is specific to older versions of ubuntu : when running multiprocessing python inside the image the OS needs to create temporary files in /run/shm and /run/lock and this does not work unless the /etc/singularity/singularity.conf is modified with an additional line: "bind path = /run" ) However when testing more, I found that box the ubuntu/xenial64 does not have a system python2 installed, just a python3, Because of that , several steps fail unless python2 is installed: some python scripts have a she-bang line like this: #!/usr/bin/env python and in absence of python2 , the python command is not found. So this is another hassle which would need to be documented in the instructions The solution I found is to use an alternative ubuntu1604 box from the bento project : http://chef.github.io/bento/ Bento is an impressive project and their vagrant boxes are well made and well regarded. https://atlas.hashicorp.com/bento * Update install-mac.md --- pages/docs/install/install-mac.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/docs/install/install-mac.md b/pages/docs/install/install-mac.md index 906d71c..2109523 100644 --- a/pages/docs/install/install-mac.md +++ b/pages/docs/install/install-mac.md @@ -17,10 +17,10 @@ brew cask install vagrant brew cask install vagrant-manager # Create a working directory for the Vagrant configuration and -# generate a template Vagrantfile for "ubuntu/xenial64" +# generate a template Vagrantfile for "bento/ubuntu-16.04" mkdir singularity-vm cd singularity-vm -vagrant init ubuntu/xenial64 +vagrant init bento/ubuntu-16.04 # Build and start the Vagrant hosted VM vagrant up --provider virtualbox From e8fcd9ec9e94d44ddd15d1c5f84fbad93430273d Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 27 May 2017 23:16:18 -0700 Subject: [PATCH 27/30] adding Vagrant Virtualbox to install mac page --- pages/docs/install/install-mac.md | 43 ++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/pages/docs/install/install-mac.md b/pages/docs/install/install-mac.md index 2109523..1118f31 100644 --- a/pages/docs/install/install-mac.md +++ b/pages/docs/install/install-mac.md @@ -7,22 +7,46 @@ folder: docs This recipe demonstrates how to run Singularity on your Mac via Vagrant and Ubuntu. The recipe requires access to `brew` which is a package installation subsystem for OS X. This recipe may take anywhere from 5-20 minutes to complete. +## Setup + +First, install brew if you do not have it already. + ```bash -# Install Brew if you do not have it installed already /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` -# The next commands will install Vagrant and the necessary bits +Next, install Vagrant and the necessary bits. + +```bash brew cask install virtualbox brew cask install vagrant brew cask install vagrant-manager +``` -# Create a working directory for the Vagrant configuration and -# generate a template Vagrantfile for "bento/ubuntu-16.04" +## Option 1: Singularityware Vagrant Box + +We are maintaining a set of Vagrant Boxes via Atlas, one of Hashicorp many tools that likely you've used and haven't known it. The Singularity Box is for version 2.2.99, and will be updated appropriately with the release of 2.3. To use this box, you can simply create a folder, and then do the following: + +```bash +mkdir singularity-vm +cd singularity-vm +vagrant init singularityware/singularity-2.2.99 +vagrant ssh +``` + +## Option 2: Vagrant Box from Scratch + +If you want to use a different version of Singularity, or want to get more familiar with how Vagrant and VirtualBox work, you can build your own Vagrant Box from scratch. In this case, we will use the Vagrantfile for `bento/ubuntu-16.04`, however you could also try any of the other bento boxes that are equally delicious. As before, you should first make a separate directory for your Vagrantfile, and then init a base image. + +```bash mkdir singularity-vm cd singularity-vm vagrant init bento/ubuntu-16.04 +``` -# Build and start the Vagrant hosted VM +Next, build and start the vagrant hosted VM, and you will install Singularity by sending the entire install script as a command (with the `-c` argument). You could just as easily shell into the box first with vagrant ssh, and then run these commands on your own. To each bento, his own. + +```bash vagrant up --provider virtualbox # Run the necessary commands within the VM to install Singularity @@ -36,11 +60,12 @@ vagrant ssh -c /bin/sh < Date: Wed, 31 May 2017 15:37:01 -0400 Subject: [PATCH 28/30] adding link to contributing clause / code of conduct --- pages/docs/contributing/contributing-code.md | 2 +- pages/docs/contributing/contributing-docs.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/docs/contributing/contributing-code.md b/pages/docs/contributing/contributing-code.md index 5190b39..359d159 100644 --- a/pages/docs/contributing/contributing-code.md +++ b/pages/docs/contributing/contributing-code.md @@ -15,7 +15,7 @@ To contribute to the development of Singularity, you must: - Have a GitHub account (this just makes it easier on me) -We use the traditional Github Flow to develop. This means that you fork the repo and checkout a branch to make changes, you submit a pull request (PR) to the development branch with your changes, and the development branch gets merged with master for official releases. +We use the traditional Github Flow to develop. This means that you fork the repo and checkout a branch to make changes, you submit a pull request (PR) to the development branch with your changes, and the development branch gets merged with master for official releases. We also have an official CONTRIBUTING document, which also includes a code of conduct. ### Step 1. Fork the repo diff --git a/pages/docs/contributing/contributing-docs.md b/pages/docs/contributing/contributing-docs.md index a1ed109..7ab6e88 100644 --- a/pages/docs/contributing/contributing-docs.md +++ b/pages/docs/contributing/contributing-docs.md @@ -20,6 +20,13 @@ Initially (on OS X), you will need to setup [Brew](http://brew.sh/) which is a p brew install git ``` +If you are on Debian/Ubuntu, then you can easily install git with `apt-get` + +```bash +apt-get update && apt-get install -y git +``` + + ### Fork the repo To contribute to the web based documentation, you should obtain a GitHub account and *fork* the Singularity GitHub Pages repository by clicking the *fork* button on the top right of the page. Once forked, you will want to clone the fork of the repo to your computer. Let's say my Github username is *user99*: From cbadcfbd993e6835522a04129321f9fc1a7bfc14 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 31 May 2017 15:37:28 -0400 Subject: [PATCH 29/30] should be master branch --- pages/docs/contributing/contributing-code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/contributing/contributing-code.md b/pages/docs/contributing/contributing-code.md index 359d159..f205d7f 100644 --- a/pages/docs/contributing/contributing-code.md +++ b/pages/docs/contributing/contributing-code.md @@ -15,7 +15,7 @@ To contribute to the development of Singularity, you must: - Have a GitHub account (this just makes it easier on me) -We use the traditional Github Flow to develop. This means that you fork the repo and checkout a branch to make changes, you submit a pull request (PR) to the development branch with your changes, and the development branch gets merged with master for official releases. We also have an official CONTRIBUTING document, which also includes a code of conduct. +We use the traditional Github Flow to develop. This means that you fork the repo and checkout a branch to make changes, you submit a pull request (PR) to the development branch with your changes, and the development branch gets merged with master for official releases. We also have an official CONTRIBUTING document, which also includes a code of conduct. ### Step 1. Fork the repo From f7327b081d8660797b7fc61990517f1f7e68a713 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 31 May 2017 16:05:59 -0400 Subject: [PATCH 30/30] adding inspect docs --- _data/sidebars/user_docs.yml | 4 + pages/docs/user-docs/docs-inspect.md | 238 +++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 pages/docs/user-docs/docs-inspect.md diff --git a/_data/sidebars/user_docs.yml b/_data/sidebars/user_docs.yml index a8accd6..67d8978 100644 --- a/_data/sidebars/user_docs.yml +++ b/_data/sidebars/user_docs.yml @@ -75,6 +75,10 @@ entries: url: /docs-import output: web, pdf + - title: inspect + url: /docs-inspect + output: web, pdf + - title: pull url: /docs-pull output: web, pdf diff --git a/pages/docs/user-docs/docs-inspect.md b/pages/docs/user-docs/docs-inspect.md new file mode 100644 index 0000000..5c73d39 --- /dev/null +++ b/pages/docs/user-docs/docs-inspect.md @@ -0,0 +1,238 @@ +--- +title: Singularity Inspect +sidebar: user_docs +permalink: docs-inspect +toc: false +folder: docs +--- + +How can you sniff an image? We have provided the inspect command for you to easily see the runscript, test script, environment, and metadata labels. + +{% include toc.html %} + +## Usage + +```bash +$ singularity inspect --help + +USAGE: singularity [...] inspect [exec options...] + +This command will show you the runscript for the image. + +INSPECT OPTIONS: + -l/--labels Show the labels associated with the image (default) + -d/--deffile Show the bootstrap definition file which was used + to generate this image + -r/--runscript Show the runscript for this image + -t/--test Show the test script for this image + -e/--environment Show the environment settings for this container + -j/--json Print structured json instead of sections + +EXAMPLES: + + $ singularity inspect ubuntu.img + #!/bin/sh + + exec /bin/bash "$@" + + $ singuarity inspect --labels ubuntu.img + { + "SINGULARITY_DEFFILE_BOOTSTRAP": "docker", + "SINGULARITY_DEFFILE": "Singularity", + "SINGULARITY_DEFFILE_FROM": "ubuntu:latest", + "SINGULARITY_BOOTSTRAP_VERSION": "2.2.99" + } + + +For additional help, please visit our public documentation pages which are +found at: + + http://singularity.lbl.gov/ + +``` + +This inspect is essential for making containers understandable by other tools and applications. + + +## JSON Api Standard +For any inspect command, by adding `--json` you can be assured to get a JSON API standardized response, for example: + +``` +singularity inspect -l --json ubuntu.img +{ + "data": { + "attributes": { + "labels": { + "SINGULARITY_DEFFILE_BOOTSTRAP": "docker", + "SINGULARITY_DEFFILE": "Singularity", + "SINGULARITY_BOOTSTRAP_VERSION": "2.2.99", + "SINGULARITY_DEFFILE_FROM": "ubuntu:latest" + } + }, + "type": "container" + } +} +``` + +## Inspect Flags +The default, if run without any arguments, will show you the container labels file + +``` +$ singularity inspect ubuntu.img +{ + "SINGULARITY_DEFFILE_BOOTSTRAP": "docker", + "SINGULARITY_DEFFILE": "Singularity", + "SINGULARITY_BOOTSTRAP_VERSION": "2.2.99", + "SINGULARITY_DEFFILE_FROM": "ubuntu:latest" +} + +``` + +and as outlined in the usage, you can specify to see any combination of `--labels`, `--environment`, `--runscript`, `--test`, and `--deffile`. The quick command to see everything, in json format, would be: + +``` +$ singularity inspect -l -r -d -t -e -j ubuntu.img +{ + "data": { + "attributes": { + "test": null, + "environment": "# Custom environment shell code should follow\n\n", + "labels": { + "SINGULARITY_DEFFILE_BOOTSTRAP": "docker", + "SINGULARITY_DEFFILE": "Singularity", + "SINGULARITY_BOOTSTRAP_VERSION": "2.2.99", + "SINGULARITY_DEFFILE_FROM": "ubuntu:latest" + }, + "deffile": "Bootstrap:docker\nFrom:ubuntu:latest\n", + "runscript": "#!/bin/sh\n\nexec /bin/bash \"$@\"" + }, + "type": "container" + } +} +``` + +### Labels +The default, if run without any arguments, will show you the container labels file (located at `/.singularity.d/labels.json` in the container. These labels are the ones that you define in the `%labels` section of your bootstrap file, along with any Docker `LABEL` that came with an image that you imported, and other metadata about the bootstrap. For example, here we are inspecting labels for `ubuntu.img` + +``` +$ singularity inspect ubuntu.img +{ + "SINGULARITY_DEFFILE_BOOTSTRAP": "docker", + "SINGULARITY_DEFFILE": "Singularity", + "SINGULARITY_BOOTSTRAP_VERSION": "2.2.99", + "SINGULARITY_DEFFILE_FROM": "ubuntu:latest" +} + +``` + +This is the equivalent of both of: + +``` +$ singularity inspect -l ubuntu.img +$ singularity inspect --labels ubuntu.img +``` + + + +### Runscript +The commands `--runscript` or `-r` will show you the runscript, which also can be shown in `--json`: + +``` +$ singularity inspect -r -j ubuntu.img{ + "data": { + "attributes": { + "runscript": "#!/bin/sh\n\nexec /bin/bash \"$@\"" + }, + "type": "container" + } +} +``` + +or in a human friendly, readable print to the screen: + +``` +$ singularity inspect -r ubuntu.img + +##runscript +#!/bin/sh + +exec /bin/bash "$@" +``` + + +### Environment +The commands `--environment` and `-e` will show you the container's environment, again specified by the `%environment` section of a bootstrap file, and other `ENV` labels that might have come from a Docker import. You can again choose to see `--json`: + +``` +$ singularity inspect -e --json ubuntu.img +{ + "data": { + "attributes": { + "environment": "# Custom environment shell code should follow\n\n" + }, + "type": "container" + } +} + +``` +or human friendly: + +``` +$ singularity inspect -e ubuntu.img + +##environment +# Custom environment shell code should follow +``` + +The container in the example above did not have any custom environment variables set. + +### Test +The equivalent `--test` or `-t` commands will print any test defined for the container, which comes from the `%test` section of the bootstrap specification Singularity file. Again, we can ask for `--json` or human friendly (default): + +``` +$ singularity --inspect -t --json ubuntu.img +{ + "data": { + "attributes": { + "test": null + }, + "type": "container" + } +} + +$ singularity inspect -t ubuntu.img +{ + "status": 404, + "detail": "This container does not have any tests defined", + "title": "Tests Undefined" +} + +``` + +### Deffile +Want to know where your container came from? You can see the entire Singularity definition file, if the container was created with a bootstrap, by using `--deffile` or `-d`: + +``` +$ singularity inspect -d ubuntu.img + +##deffile +Bootstrap:docker +From:ubuntu:latest +``` +or with `--json` output. + +``` +$ singularity inspect -d --json ubuntu.img +{ + "data": { + "attributes": { + "deffile": "Bootstrap:docker\nFrom:ubuntu:latest\n" + }, + "type": "container" + } +} + +``` + +The goal of these commands is to bring more transparency to containers, and to help better integrate them into common workflows by having them expose their guts to the world! If you have feedback for how we can improve or amend this, please let us know! +