1singularity(1)                                                  singularity(1)
2
3
4

NAME

6       singularity-exec - Run a command within a container
7
8
9

SYNOPSIS

11       singularity exec [exec options...] <container> <command>
12
13
14

DESCRIPTION

16       singularity exec supports the following formats:
17
18
19       *.sif               Singularity Image Format (SIF). Native to
20       Singularity 3.0+
21
22
23       *.sqsh              SquashFS format.  Native to Singularity 2.4+
24
25
26       *.img               ext3 format. Native to Singularity versions < 2.4.
27
28
29       directory/          sandbox format. Directory containing a valid root
30       file
31                             system and optionally Singularity meta-data.
32
33
34       instance://*        A local running instance of a container. (See the
35       instance
36                             command group.)
37
38
39       library://*         A container hosted on a Library (default
40
41https://cloud.sylabs.io/library)⟩
42
43
44       docker://*          A container hosted on Docker Hub
45
46
47       shub://*            A container hosted on Singularity Hub
48
49
50

OPTIONS

52       --add-caps=""
53           a comma separated capability list to add
54
55
56       --allow-setuid[=false]
57           allow setuid binaries in container (root only)
58
59
60       --app=""
61           set an application to run inside a container
62
63
64       --apply-cgroups=""
65           apply cgroups from file for container processes (root only)
66
67
68       -B, --bind=[]
69           a user-bind path specification.  spec has the format
70       src[:dest[:opts]], where src and dest are outside and inside paths.  If
71       dest is not given, it is set equal to src.  Mount options ('opts') may
72       be specified as 'ro' (read-only) or 'rw' (read/write, which is the
73       default). Multiple bind paths can be given by a comma separated list.
74
75
76       -e, --cleanenv[=false]
77           clean environment before running container
78
79
80       -c, --contain[=false]
81           use minimal /dev and empty other directories (e.g. /tmp and $HOME)
82       instead of sharing filesystems from your host
83
84
85       -C, --containall[=false]
86           contain not only file systems, but also PID, IPC, and environment
87
88
89       --dns=""
90           list of DNS server separated by commas to add in resolv.conf
91
92
93       --docker-login[=false]
94           login to a Docker Repository interactively
95
96
97       --drop-caps=""
98           a comma separated capability list to drop
99
100
101       -h, --help[=false]
102           help for exec
103
104
105       -H, --home="/builddir"
106           a home directory specification.  spec can either be a src path or
107       src:dest pair.  src is the source path of the home directory outside
108       the container and dest overrides the home directory within the
109       container.
110
111
112       --hostname=""
113           set container hostname
114
115
116       -i, --ipc[=false]
117           run container in a new IPC namespace
118
119
120       --keep-privs[=false]
121           let root user keep privileges in container (root only)
122
123
124       -n, --net[=false]
125           run container in a new network namespace (sets up a bridge network
126       interface by default)
127
128
129       --network="bridge"
130           specify desired network type separated by commas, each network will
131       bring up a dedicated interface inside container
132
133
134       --network-args=[]
135           specify network arguments to pass to CNI plugins
136
137
138       --no-home[=false]
139           do NOT mount users home directory if home is not the current
140       working directory
141
142
143       --no-init[=false]
144           do NOT start shim process with --pid
145
146
147       --no-privs[=false]
148           drop all privileges from root user in container
149
150
151       --nohttps[=false]
152           do NOT use HTTPS, for communicating with local docker registry
153
154
155       --nv[=false]
156           enable experimental Nvidia support
157
158
159       -o, --overlay=[]
160           use an overlayFS image for persistent data storage or as read-only
161       layer of container
162
163
164       -p, --pid[=false]
165           run container in a new PID namespace
166
167
168       --pwd=""
169           initial working directory for payload process inside the container
170
171
172       -S, --scratch=[]
173           include a scratch directory within the container that is linked to
174       a temporary dir (use -W to force location)
175
176
177       --security=[]
178           enable security features (SELinux, Apparmor, Seccomp)
179
180
181       -u, --userns[=false]
182           run container in a new user namespace, allowing Singularity to run
183       completely unprivileged on recent kernels. This disables some features
184       of Singularity, for example it only works with sandbox images.
185
186
187       --uts[=false]
188           run container in a new UTS namespace
189
190
191       --vm[=false]
192           enable VM support
193
194
195       --vm-cpu="1"
196           Number of CPU cores to allocate to Virtual Machine (implies --vm)
197
198
199       --vm-err[=false]
200           enable attaching stderr from VM
201
202
203       --vm-ram="1024"
204           Amount of RAM in MiB to allocate to Virtual Machine (implies --vm)
205
206
207       -W, --workdir=""
208           working directory to be used for /tmp, /var/tmp and $HOME (if
209       -c/--contain was also used)
210
211
212       -w, --writable[=false]
213           by default all Singularity containers are available as read only.
214       This option makes the file system accessible as read/write.
215
216
217       --writable-tmpfs[=false]
218           makes the file system accessible as read-write with non persistent
219       data (with overlay support only)
220
221
222

EXAMPLE

224                $ singularity exec /tmp/debian.sif cat /etc/debian_version
225                $ singularity exec /tmp/debian.sif python ./hello_world.py
226                $ cat hello_world.py | singularity exec /tmp/debian.sif python
227                $ sudo singularity exec --writable /tmp/debian.sif apt-get update
228                $ singularity exec instance://my_instance ps -ef
229                $ singularity exec library://centos cat /etc/os-release
230
231
232
233

SEE ALSO

235       singularity(1)
236
237
238

HISTORY

240       29-May-2019 Auto generated by spf13/cobra
241
242
243
244Auto generated by spf13/cobra      May 2019                     singularity(1)
Impressum