|
|
Containers are a solution to provide your software, library, ... in an isolated environment.
|
|
|
|
|
|
On atlas we provide these container software:
|
|
|
|
|
|
- docker
|
|
|
- singularity (recommended)
|
|
|
|
|
|
To use docker, you have to ask an account to system administrators, but we recommend to use singularity if possible.
|
|
|
|
|
|
# Preriquisites
|
|
|
|
|
|
Up to date docker and singularity documentation is available at
|
|
|
|
|
|
* https://www.docker.com/
|
|
|
* http://singularity.lbl.gov/
|
|
|
|
|
|
and should be the reference documentation.
|
|
|
|
|
|
# Singularity.
|
|
|
|
|
|
Singularity is installed as a ubuntu package now. You do not need to load any modules anymore.
|
|
|
|
|
|
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/)
|
|
|
|
|
|
#### Usage example:
|
|
|
|
|
|
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!
|
|
|
|
|
|
Remember that you always have the same priviledge than on the host, you can't edit root directory. If you want to edit an image, you have to download it on your own machine, then do the changes.
|
|
|
|
|
|
|
|
|
Note for feel++ users, images are available on [IRMA gitlab](https://gitlab.math.unistra.fr/feelpp/feelpp-singularity-images) |