@@ -14,8 +14,8 @@ or services.
14
14
15
15
Singularity compose uses Singularity on the backend, so anything that would require sudo (root)
16
16
permissions for Singularity is also required for Singularity compose. This includes most
17
- networking commands (e.g., asking to allocate ports) and builds from recipe files.
18
- However, if you are using Singularity v3.3 or higher, you can take advantage of
17
+ networking commands (e.g., asking to allocate ports) and builds from recipe files.
18
+ However, if you are using Singularity v3.3 or higher, you can take advantage of
19
19
[ fakeroot] ( https://sylabs.io/guides/3.3/user-guide/fakeroot.html ) to try and get around this.
20
20
The snippet below shows how to add fakeroot as an option under a build section:
21
21
@@ -34,15 +34,15 @@ And a complete example is provided [here](https://github.com/singularityhub/sing
34
34
35
35
### Dependencies
36
36
37
- Singularity Compose *must* use a version of [Singularity](https://sylabs.io/guides/latest/user-guide/)
37
+ Singularity Compose *must* use a version of [Singularity](https://sylabs.io/guides/latest/user-guide/)
38
38
3.2.1 or greater. It's recommended to use the latest (3.3.0 release at the time of this writing) otherwise there was
39
39
a bug with some versions of 3.2.1. Singularity 2.x absolutely will not work.
40
40
Python 3 is also required, as Python 2 is at end of life.
41
41
42
42
### singularity-compose.yml
43
43
44
44
For a singularity-compose project, it's expected to have a ` singularity-compose.yml`
45
- in the present working directory. You can look at a simple example here, here is a
45
+ in the present working directory. You can look at a simple example here, here is a
46
46
version 1.0 spec (before we added networking and exec options) :
47
47
48
48
` ` ` yaml
@@ -60,7 +60,7 @@ instances:
60
60
- 80:80
61
61
` ` `
62
62
63
- and [here](https://github.com/singularityhub/singularity-compose-examples/tree/4241ea8b4e068d93859acb7d2b924702815af0ce/v2.0/ping)
63
+ and [here](https://github.com/singularityhub/singularity-compose-examples/tree/4241ea8b4e068d93859acb7d2b924702815af0ce/v2.0/ping)
64
64
is a version 2.0 spec that shows adding networking and exec options :
65
65
66
66
` ` ` yaml
@@ -77,7 +77,7 @@ instances:
77
77
options:
78
78
- fakeroot
79
79
exec:
80
- options:
80
+ options:
81
81
- "env-file=myvars.env"
82
82
command: printenv SUPERHERO
83
83
alp2:
@@ -95,17 +95,17 @@ instances:
95
95
- alp1
96
96
` ` `
97
97
98
- If you are familiar with [docker-compose](https://docs.docker.com/compose/)
99
- the file should look very familiar. A key difference is that instead of
100
- " services" we have "instances." And you guessed correctly - each
101
- section there corresponds to a
98
+ If you are familiar with [docker-compose](https://docs.docker.com/compose/)
99
+ the file should look very familiar. A key difference is that instead of
100
+ " services" we have "instances." And you guessed correctly - each
101
+ section there corresponds to a
102
102
[Singularity instance](https://sylabs.io/guides/3.2/user-guide/running_services.html)
103
103
that will be created. In this guide, we will walk through each of the sections
104
104
in detail.
105
105
106
106
# ## Instance folders
107
107
108
- Generally, each section in the yaml file corresponds with a container instance to be run,
108
+ Generally, each section in the yaml file corresponds with a container instance to be run,
109
109
and each container instance is matched to a folder in the present working directory.
110
110
For example, if I give instruction to build an `nginx` instance from
111
111
a `nginx/Singularity.nginx` file, I should have the
@@ -155,15 +155,15 @@ This will pull a container `nginx.sif` into a `nginx` context folder:
155
155
```
156
156
157
157
It's less likely that you will be able to pull a container that is ready to
158
- go, as typically you will want to customize the
159
- [ startscript] ( https://sylabs.io/guides/3.2/user-guide/definition_files.html#startscript )
158
+ go, as typically you will want to customize the
159
+ [ startscript] ( https://sylabs.io/guides/3.2/user-guide/definition_files.html#startscript )
160
160
for the instance. Now that we understand the basic organization, let's
161
161
bring up some instances.
162
162
163
163
## Quick Start
164
164
165
- For this quick start, we are going to use the
166
- [ singularity-compose-simple] ( https://www.github.com/singularityhub/singularity-compose-simple )
165
+ For this quick start, we are going to use the
166
+ [ singularity-compose-simple] ( https://www.github.com/singularityhub/singularity-compose-simple )
167
167
example. Singularity has a networking issue that currently doesn't allow communication
168
168
between multiple containers (due to iptables and firewall issues) so for now the most we
169
169
can do is show you one container. First, install singularity-compose from pip:
@@ -255,7 +255,7 @@ $ singularity-compose exec app uname -a
255
255
```
256
256
257
257
When you open your browser to [ http://127.0.0.1 ] ( http://127.0.0.1 )
258
- you should see the upload interface.
258
+ you should see the upload interface.
259
259
260
260
![ img/upload.png] ( img/upload.png )
261
261
@@ -277,7 +277,7 @@ The images that you upload are stored in `images` at the root:
277
277
278
278
``` bash
279
279
$ ls images/
280
- 2018-02-20-172617.jpg 40-acos.png _upload
280
+ 2018-02-20-172617.jpg 40-acos.png _upload
281
281
```
282
282
283
283
And static files are in ` static ` .
@@ -349,7 +349,7 @@ $ singularity instance start \
349
349
350
350
Control and customization of these instances is probably the coolest (and not widely
351
351
used) feature of Singularity. You can create your own network configurations,
352
- and customie the arguments to the command. Read [ here] ( https://sylabs.io/guides/3.2/user-guide/running_services.html ) for more detalis.
352
+ and customize the arguments to the command. Read [ here] ( https://sylabs.io/guides/3.2/user-guide/running_services.html ) for more detalis.
353
353
354
354
## Commands
355
355
@@ -360,7 +360,7 @@ Python API, see [here](/singularity-compose/api/).
360
360
361
361
The [ specification] ( spec/ ) describes in more detail the sections of the singularity-compose.yml.
362
362
For example, in the quick start above, we have a post command for the app instance
363
- that creates a series of folders on the host.
363
+ that creates a series of folders on the host.
364
364
365
365
## Examples
366
366
0 commit comments