... | ... | @@ -10,33 +10,41 @@ Singularity documentation is available at <http://singularity.lbl.gov/> and shou |
|
|
|
|
|
To work with singularity, you have to download/create a singularity image (containing every software you need).
|
|
|
To create a new image, see the [official documentation](http://singularity.lbl.gov/create-image).
|
|
|
You can download existing singularity images on [singularity hub](https://singularity-hub.org/)
|
|
|
You can download existing singularity images on [singularity hub](https://singularity-hub.org/).
|
|
|
|
|
|
#### Usage example:
|
|
|
|
|
|
Let's work the [hello world official image](https://singularity-hub.org/collections/83/
|
|
|
Let's work the [hello world official image](https://singularity-hub.org/collections/83/)
|
|
|
|
|
|
```sh
|
|
|
singularity pull shub://vsoch/singularity-hello-world
|
|
|
```
|
|
|
|
|
|
Now you have the `vsoch-singularity-hello-world-master.img` in the current directory.
|
|
|
To execute hello world,
|
|
|
|
|
|
```sh
|
|
|
singularity run vsoch-singularity-hello-world-master.img
|
|
|
```
|
|
|
|
|
|
Now, if you want to go inside the container in a shell environment, just type
|
|
|
|
|
|
```sh
|
|
|
singularity shell vsoch-singularity-hello-world-master.img
|
|
|
```
|
|
|
|
|
|
and now you are inside the image isolated from the host system! By default, the home directory is mounted inside the image.
|
|
|
To edit an image, add the option `-w`
|
|
|
|
|
|
```sh
|
|
|
singularity shell -w vsoch-singularity-hello-world-master.img
|
|
|
```
|
|
|
Note that you always have the same privilege in the image than on the host (you can't edit directory you do not have rights!).
|
|
|
|
|
|
Note that you always have the same privilege in the image than on the host (you can't edit directory you do not have permissions!).
|
|
|
|
|
|
If you want to modify the image anyway, you have to download the image on a machine where you are the administrator and edit the image as root.
|
|
|
|
|
|
|
|
|
#### Feel++ users
|
|
|
|
|
|
CI generated images are available on [IRMA gitlab](https://gitlab.math.unistra.fr/feelpp/feelpp-singularity-images) |
|
|
CI generated images are available on [IRMA gitlab](https://gitlab.math.unistra.fr/feelpp/feelpp-singularity-images). |