Skip to content

Commit fcc9315

Browse files
committed
removed Usage sections from commands
1 parent 710e561 commit fcc9315

File tree

8 files changed

+5
-431
lines changed

8 files changed

+5
-431
lines changed

pages/docs/user-docs/docs-bootstrap.md

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,87 +10,6 @@ The process of *bootstrapping* a Singularity container is equivalent to describi
1010

1111
{% include toc.html %}
1212

13-
## Usage
14-
15-
```
16-
USAGE: singularity [...] bootstrap <container path> <definition file>
17-
18-
The bootstrap command is useful for creating a new bootstrap or modifying an
19-
existing one using a definition file that describes how to build the
20-
container. The quickest, easiest Bootstrap is dumping DOcker layers into
21-
a container:
22-
23-
BootStrap: docker
24-
From: library/ubuntu:14.04.1
25-
26-
For more documentation on definition file recipes, look below.
27-
28-
note: This command must be executed as root.
29-
30-
31-
32-
CREATE OPTIONS:
33-
-T|--notest Bootstrap without running tests in %test section
34-
-f|--force Force a rebootstrap of an OS (note: this does not delete
35-
what is currently in the image, just causes the core to
36-
be reinstalled)
37-
-s|--section Only run a given section within the bootstrap (setup,
38-
post, files, environment, test, labels, none)
39-
--nobase Skip the generation of the base OS
40-
41-
42-
DEFFILE BASEOS EXAMPLES:
43-
44-
Docker:
45-
BootStrap: docker
46-
From: tensorflow/tensorflow:latest
47-
IncludeCmd: yes #Include the CMD/ENTRYPOINT as the Singularity Runscript
48-
49-
YUM/RHEL:
50-
BootStrap: yum
51-
OSVersion: 7
52-
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
53-
Include: yum #This is important to include inside the base container
54-
55-
Debian/Ubuntu:
56-
BootStrap: debootstrap
57-
OSVersion: trusty
58-
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
59-
60-
61-
DEFFILE SECTION EXAMPLES:
62-
63-
%setup
64-
echo "This is a scriptlet that will be executed on the host, as root, after"
65-
echo "the container has been bootstrapped. To install things into the container"
66-
echo "reference the file system location with \$SINGULARITY_BUILDROOT"
67-
68-
%post
69-
echo "This scriptlet section will be executed from within the container after"
70-
echo "the bootstrap/base has been created and setup"
71-
72-
%test
73-
echo "Define any test commands that should be executed after container has been"
74-
echo "built. This scriptlet will be executed from within the running container"
75-
echo "as the root user. Pay attention to the exit/return value of this scriptlet"
76-
echo "as any non-zero exit code will be assumed as failure"
77-
exit 0
78-
79-
%labels
80-
HELLO MOTO
81-
KEY VALUE
82-
83-
%files
84-
/path/on/host/file.txt /path/on/container/file.txt
85-
relative_file.txt /path/on/container/relative_file.txt
86-
87-
88-
EXAMPLES:
89-
90-
$ singularity create /tmp/Debian.img
91-
$ sudo singularity bootstrap /tmp/Debian.img debian.def
92-
```
93-
9413
## The header fields:
9514

9615
### Bootstrap:

pages/docs/user-docs/docs-exec.md

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -10,78 +10,9 @@ The `exec` Singularity sub-command allows you to spawn an arbitrary command with
1010

1111
{% include toc.html %}
1212

13-
## Usage
13+
## Examples
1414

15-
The usage is as follows:
16-
17-
```
18-
USAGE: singularity [...] exec [exec options...] <container path> <command>
19-
20-
This command will allow you to execute any program within the given
21-
container image.
22-
23-
EXEC OPTIONS:
24-
-B/--bind <spec> A user-bind path specification. spec has the format
25-
src[:dest[:opts]], where src and dest are outside and
26-
inside paths. If dest is not given, it is set equal
27-
to src. Mount options ('opts') may be specified as
28-
'ro' (read-only) or 'rw' (read/write, which is the
29-
default). This option can be called multiple times.
30-
-c/--contain This option disables the sharing of filesystems on
31-
your host (e.g. /dev, $HOME and /tmp).
32-
-C/--containall Contain not only file systems, but also PID and IPC
33-
-e/--cleanenv Clean environment before running container
34-
-H/--home <spec> A home directory specification. spec can either be a
35-
src path or src:dest pair. src is the source path
36-
of the home directory outside the container and dest
37-
overrides the home directory within the container
38-
-i/--ipc Run container in a new IPC namespace
39-
-n/--nv Enable experimental Nvidia support
40-
-p/--pid Run container in a new PID namespace
41-
--pwd Initial working directory for payload process inside
42-
the container
43-
-S/--scratch <path> Include a scratch directory within the container that
44-
is linked to a temporary dir (use -W to force location)
45-
-u/--user Run container in a new user namespace (this allows
46-
Singularity to run completely unprivileged on recent
47-
kernels and doesn't support all features)
48-
-W/--workdir Working directory to be used for /tmp, /var/tmp and
49-
$HOME (if -c/--contain was also used)
50-
-w/--writable By default all Singularity containers are available as
51-
read only. This option makes the file system accessible
52-
as read/write.
53-
54-
55-
CONTAINER FORMATS SUPPORTED:
56-
*.img This is the native Singularity image format for all
57-
Singularity versions 2.x.
58-
*.sqsh SquashFS format, note the suffix is required!
59-
*.tar* Tar archives are exploded to a temporary directory and
60-
run within that directory (and cleaned up after). The
61-
contents of the archive is a root file system with root
62-
being in the current directory. Compression suffixes as
63-
'.gz' and '.bz2' are supported.
64-
directory/ Container directories that contain a valid root file
65-
system.
66-
67-
68-
EXAMPLES:
69-
70-
$ singularity exec /tmp/Debian.img cat /etc/debian_version
71-
$ singularity exec /tmp/Debian.img python ./hello_world.py
72-
$ cat hello_world.py | singularity exec /tmp/Debian.img python
73-
$ sudo singularity exec --writable /tmp/Debian.img apt-get update
74-
75-
For additional help, please visit our public documentation pages which are
76-
found at:
77-
78-
http://singularity.lbl.gov/
79-
80-
```
81-
82-
### Examples
83-
84-
#### Printing the OS release inside the container:
15+
### Printing the OS release inside the container:
8516

8617
```bash
8718
$ singularity exec container.img cat /etc/os-release
@@ -96,7 +27,7 @@ BUG_REPORT_URL="https://bugs.debian.org/"
9627
$
9728
```
9829

99-
#### Special Characters
30+
### Special Characters
10031
And properly passing along special characters to the program within the container.
10132

10233
```bash
@@ -115,7 +46,7 @@ $
11546
```
11647

11748

118-
#### A Python example
49+
### A Python example
11950
Starting with the file `hello.py` in the current directory with the contents of:
12051

12152
```python
@@ -161,7 +92,7 @@ Downloading layer: sha256:6a5a5368e0c2d3e5909184fa28ddfd56072e7ff3ee9a945876f7ee
16192
Hello World: The Python version is 3.5.2
16293
```
16394

164-
#### A GPU example
95+
### A GPU example
16596
If you're host system has an NVIDIA GPU card and a driver installed you can
16697
leverage the card with the `--nv` option. (This example requires a fairly
16798
recent version of the NVIDIA driver on the host system to run the latest

pages/docs/user-docs/docs-export.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,3 @@ folder: docs
77
---
88

99
Export is a way to dump the contents of your container into a .tar.gz, or a stream to put into some other place. For example, you could stream this into an in memory tar in python.
10-
11-
## Usage
12-
13-
```bash
14-
USAGE: singularity [...] export [export options...] <container path>
15-
16-
Export will dump a tar stream of the container image contents to standard
17-
out (stdout).
18-
19-
EXPORT OPTIONS:
20-
-f/--file Output to a file instead of a pipe
21-
--command Replace the tar command (DEFAULT: 'tar cf - .')
22-
23-
EXAMPLES:
24-
25-
$ singularity export /tmp/Debian.img > /tmp/Debian.tar
26-
$ singularity export /tmp/Debian.img | gzip -9 > /tmp/Debian.tar.gz
27-
$ singularity export -f Debian.tar /tmp/Debian.img
28-
29-
```

pages/docs/user-docs/docs-import.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,3 @@ folder: docs
77
---
88

99
Singularity import is essentially taking a dump of files and folders and adding them to your image. This works for local compressed things (e.g., tar.gz) but also for docker image layers that you don't have on your system. As of version 2.3, import of docker layers includes the environment and metadata without needing sudo.
10-
11-
## Usage
12-
13-
```bash
14-
USAGE: singularity [...] import <container path> [import from URI]
15-
16-
Import takes a URI and will populate a container with the contents of
17-
the URI. If no URI is given, import will expect an incoming tar pipe.
18-
19-
The size of the container you need to create to import a complete system
20-
may be significantly larger than the size of the tar file/stream due to
21-
overheads of the container filesystem.
22-
23-
SUPPORTED URIs:
24-
25-
http/https: Pull an image using curl over HTTPD
26-
docker: Pull an image from the Docker repository
27-
shub: Pull an image from Singularity Hub
28-
file: Use a local file (same as just passing local path)
29-
30-
SUPPORTED FILE TYPES:
31-
32-
.tar, .tar.gz, .tgz, .tar.bz2
33-
34-
EXAMPLES:
35-
36-
Once you have created the base image template:
37-
38-
$ singularity create /tmp/Debian.img
39-
40-
You can then import:
41-
42-
$ gunzip -c debian.tar.gz | singularity import /tmp/Debian
43-
$ singularity import /tmp/Debian.img debian.tar.gz
44-
$ singularity import /tmp/Debian.img file://debian.tar.gz
45-
$ singularity import /tmp/Debian.img http://foo.com/debian.tar.gz
46-
$ singularity import /tmp/Debian.img docker://ubuntu:latest
47-
48-
```

pages/docs/user-docs/docs-inspect.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,6 @@ How can you sniff an image? We have provided the inspect command for you to easi
1010

1111
{% include toc.html %}
1212

13-
## Usage
14-
15-
```bash
16-
$ singularity inspect --help
17-
18-
USAGE: singularity [...] inspect [exec options...] <container path>
19-
20-
This command will show you the runscript for the image.
21-
22-
INSPECT OPTIONS:
23-
-l/--labels Show the labels associated with the image (default)
24-
-d/--deffile Show the bootstrap definition file which was used
25-
to generate this image
26-
-r/--runscript Show the runscript for this image
27-
-t/--test Show the test script for this image
28-
-e/--environment Show the environment settings for this container
29-
-j/--json Print structured json instead of sections
30-
31-
EXAMPLES:
32-
33-
$ singularity inspect ubuntu.img
34-
#!/bin/sh
35-
36-
exec /bin/bash "$@"
37-
38-
$ singularity inspect --labels ubuntu.img
39-
{
40-
"SINGULARITY_DEFFILE_BOOTSTRAP": "docker",
41-
"SINGULARITY_DEFFILE": "Singularity",
42-
"SINGULARITY_DEFFILE_FROM": "ubuntu:latest",
43-
"SINGULARITY_BOOTSTRAP_VERSION": "2.2.99"
44-
}
45-
46-
47-
For additional help, please visit our public documentation pages which are
48-
found at:
49-
50-
http://singularity.lbl.gov/
51-
52-
```
53-
5413
This inspect is essential for making containers understandable by other tools and applications.
5514

5615

pages/docs/user-docs/docs-pull.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,6 @@ Singularity `pull` is the command that you would want to use to communicate with
1010

1111
{% include toc.html %}
1212

13-
## Usage
14-
15-
```
16-
USAGE: singularity [...] pull shub:// [unique id]
17-
18-
pull takes a Singularity Hub (shub) URI and will pull a container
19-
to PWD. If you want the image to go to SINGULARITY_CACHEDIR, you
20-
should use one of run, exec, or shell.
21-
22-
SUPPORTED URIs:
23-
24-
shub: Pull an image using python from Singularity Hub to $PWD
25-
docker: Pull a docker image using python to $PWD
26-
27-
PULL OPTIONS:
28-
-n/--name Specify a custom container name (first priority)
29-
-C/--commit Name container based on Github commit (second priority)
30-
-H/--hash Name container based on file hash (second priority)
31-
32-
33-
EXAMPLES:
34-
35-
$ singularity pull docker://ubuntu:latest
36-
37-
$ singularity pull shub://vsoch/singularity-images
38-
Found image vsoch/singularity-images:mongo
39-
Downloading image... vsoch-singularity-images-mongo.img
40-
41-
$ singularity pull --name "meatballs.img" shub://vsoch/singularity-images
42-
$ singularity pull --commit shub://vsoch/singularity-images
43-
$ singularity pull --hash shub://vsoch/singularity-images
44-
```
45-
4613
## Singularity Hub
4714
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:
4815

0 commit comments

Comments
 (0)