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

NAME

6       singularity-test - Run the user-defined tests within a container
7
8
9

SYNOPSIS

11       singularity test [exec options...]
12
13
14

DESCRIPTION

16       The  'test'  command  allows you to execute a testscript (if available)
17       inside of
18         a given container
19
20
21       NOTE:
22             For instances if there is a daemon  process  running  inside  the
23       container,
24             then subsequent container commands will all run within the same
25             namespaces.  This means that the --writable and --contain options
26       will not
27             be honored as the namespaces have already been configured by the
28             'singularity start' command.
29
30
31

OPTIONS

33       --add-caps=""      a comma separated capability list to add
34
35
36       --allow-setuid[=false]      allow setuid binaries  in  container  (root
37       only)
38
39
40       --app=""      set an application to run inside a container
41
42
43       --apply-cgroups=""      apply cgroups from file for container processes
44       (root only)
45
46
47       -B, --bind=[]      a user-bind path specification.  spec has the format
48       src[:dest[:opts]], where src and dest are outside and inside paths.  If
49       dest is not given, it is set equal to src.  Mount options ('opts')  may
50       be  specified as 'ro' (read-only) or 'rw' (read/write, which is the de‐
51       fault). Multiple bind paths can be given by a comma separated list.
52
53
54       --blkio-weight=0      Block IO relative weight in range 10-1000,  0  to
55       disable
56
57
58       --blkio-weight-device=[]      Device specific block IO relative weight
59
60
61       -e, --cleanenv[=false]      clean environment before running container
62
63
64       --compat[=false]       apply settings for increased OCI/Docker compati‐
65       bility.  Infers   --containall,   --no-init,   --no-umask,   --no-eval,
66       --writable-tmpfs.
67
68
69       -c, --contain[=false]      use minimal /dev and empty other directories
70       (e.g. /tmp and $HOME) instead of sharing filesystems from your host
71
72
73       -C, --containall[=false]      contain not only file systems,  but  also
74       PID, IPC, and environment
75
76
77       --cpu-shares=-1      CPU shares for container
78
79
80       --cpus=""      Number of CPUs available to container
81
82
83       --cpuset-cpus=""      List of host CPUs available to container
84
85
86       --cpuset-mems=""      List of host memory nodes available to container
87
88
89       --disable-cache[=false]      dont use cache, and dont create cache
90
91
92       --dns=""       list  of  DNS  server  separated by commas to add in re‐
93       solv.conf
94
95
96       --docker-host=""      specify a custom Docker daemon host
97
98
99       --docker-login[=false]      login to a Docker Repository interactively
100
101
102       --drop-caps=""      a comma separated capability list to drop
103
104
105       --env=[]      pass environment variable to contained process
106
107
108       --env-file=""      pass environment variables from  file  to  contained
109       process
110
111
112       -f,  --fakeroot[=false]      run container in new user namespace as uid
113       0
114
115
116       --fusemount=[]      A FUSE filesystem mount specification of  the  form
117       ': ' - where  is 'container' or 'host', specifying where the mount will
118       be performed ('container-daemon' or 'host-daemon'  will  run  the  FUSE
119       process  detached).   is  the path to the FUSE executable, plus options
120       for the mount.  is the location in the  container  to  which  the  FUSE
121       mount  will  be attached. E.g. 'container:sshfs 10.0.0.1:/ /sshfs'. Im‐
122       plies --pid.
123
124
125       -h, --help[=false]      help for test
126
127
128       -H, --home="/builddir"      a home directory specification.   spec  can
129       either  be  a src path or src:dest pair.  src is the source path of the
130       home directory outside the container and dest overrides the home direc‐
131       tory within the container.
132
133
134       --hostname=""      set container hostname. Infers --uts.
135
136
137       -i, --ipc[=false]      run container in a new IPC namespace
138
139
140       --keep-privs[=false]       let  root  user keep privileges in container
141       (root only)
142
143
144       --memory=""      Memory limit in bytes
145
146
147       --memory-reservation=""      Memory soft limit in bytes
148
149
150       --memory-swap=""      Swap limit, use -1 for unlimited swap
151
152
153       --mount=[]      a mount specification e.g.  'type=bind,source=/opt,des‐
154       tination=/hostopt'.
155
156
157       -n,  --net[=false]       run container in a new network namespace (sets
158       up a bridge network interface by default)
159
160
161       --network="bridge"      specify desired network type separated by  com‐
162       mas, each network will bring up a dedicated interface inside container
163
164
165       --network-args=[]      specify network arguments to pass to CNI plugins
166
167
168       --no-eval[=false]       do not shell evaluate env vars or OCI container
169       CMD/ENTRYPOINT/ARGS
170
171
172       --no-home[=false]      do NOT mount users home directory  if  /home  is
173       not the current working directory
174
175
176       --no-https[=false]      use http instead of https for docker:// oras://
177       and library:///... URIs
178
179
180       --no-init[=false]      do NOT start shim process with --pid
181
182
183       --no-mount=[]      disable one or more 'mount xxx' options set in  sin‐
184       gularity.conf, specify absolute destination path to disable a bind path
185       entry, or 'bind-paths' to disable all bind path entries.
186
187
188       --no-privs[=false]      drop all privileges  from  root  user  in  con‐
189       tainer)
190
191
192       --no-setgroups[=false]       disable setgroups when entering --fakeroot
193       user namespace
194
195
196       --no-umask[=false]      do not propagate umask to  the  container,  set
197       default 0022 umask
198
199
200       --nv[=false]      enable Nvidia support
201
202
203       --nvccli[=false]       use  nvidia-container-cli for GPU setup (experi‐
204       mental)
205
206
207       --oci[=false]      Launch container with OCI runtime (experimental)
208
209
210       --oom-kill-disable[=false]      Disable OOM killer
211
212
213       -o, --overlay=[]      use an overlayFS image for persistent data  stor‐
214       age or as read-only layer of container
215
216
217       --passphrase[=false]      prompt for an encryption passphrase
218
219
220       --pem-path=""       enter an path to a PEM formatted RSA key for an en‐
221       crypted container
222
223
224       -p, --pid[=false]      run container in a new PID namespace
225
226
227       --pids-limit=0      Limit number of container PIDs, use -1  for  unlim‐
228       ited
229
230
231       --pwd=""       initial working directory for payload process inside the
232       container
233
234
235       --rocm[=false]      enable experimental Rocm support
236
237
238       -S, --scratch=[]      include a scratch directory within the  container
239       that is linked to a temporary dir (use -W to force location)
240
241
242       --security=[]       enable  security  features (SELinux, Apparmor, Sec‐
243       comp)
244
245
246       --sif-fuse[=false]      attempt FUSE mount of SIF (unprivileged /  user
247       namespace only) (experimental)
248
249
250       -u, --userns[=false]      run container in a new user namespace, allow‐
251       ing Singularity to run completely unprivileged on recent kernels.  This
252       disables  some  features of Singularity, for example it only works with
253       sandbox images.
254
255
256       --uts[=false]      run container in a new UTS namespace
257
258
259       --vm[=false]      enable VM support
260
261
262       --vm-cpu="1"      number of CPU cores to allocate  to  Virtual  Machine
263       (implies --vm)
264
265
266       --vm-err[=false]      enable attaching stderr from VM
267
268
269       --vm-ip="dhcp"       IP Address to assign for container usage. Defaults
270       to DHCP within bridge network.
271
272
273       --vm-ram="1024"      amount of RAM in MiB to allocate  to  Virtual  Ma‐
274       chine (implies --vm)
275
276
277       -W,  --workdir=""       working directory to be used for /tmp, /var/tmp
278       and $HOME (if -c/--contain was also used)
279
280
281       -w, --writable[=false]      by default all Singularity  containers  are
282       available as read only. This option makes the file system accessible as
283       read/write.
284
285
286       --writable-tmpfs[=false]      makes the file system accessible as read-
287       write with non persistent data (with overlay support only)
288
289
290

EXAMPLE

292                Set the '%test' section with a definition file like so:
293                %test
294                    echo "hello from test" "$@"
295
296                $ singularity test /tmp/debian.sif command
297                    hello from test command
298
299                For additional help, please visit our public documentation pages which are
300                found at:
301
302                    https://www.sylabs.io/docs/
303
304
305
306

SEE ALSO

308       singularity(1)
309
310
311

HISTORY

313       18-Sep-2023 Auto generated by spf13/cobra
314
315
316
317Auto generated by spf13/cobra      Sep 2023                     singularity(1)
Impressum