Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmeli/containers
Docker and Singularity recipes
https://github.com/rmeli/containers
Last synced: 22 days ago
JSON representation
Docker and Singularity recipes
- Host: GitHub
- URL: https://github.com/rmeli/containers
- Owner: RMeli
- License: bsd-3-clause
- Created: 2021-01-26T21:28:36.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T16:06:29.000Z (3 months ago)
- Last Synced: 2024-08-09T17:50:29.872Z (3 months ago)
- Language: Dockerfile
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Containers
[Docker](https://www.docker.com/) and [Singularity](https://sylabs.io/singularity/) recipes.
## Singularity
### Build
```bash
sudo singularity build .sif .def
```or
```bash
sudo singularity build --notest .sif .def
```The `--notest` flag is needed to prevent [Singularity](https://sylabs.io/singularity/) to run the tests, in case they need GPU support.
### Test
```bash
singularity test --nv .sif
```### Run
#### Interactive
```bash
singularity shell --nv .sif
```#### Application
```bash
singularity run --nv --app .sif []
```## Docker
### Build
```bash
docker build -t .
```It is possible to build a container from a specific file:
```bash
docker build -t -f .
```### Save & Load
A [Docker](https://www.docker.com/) container can be saved
```
docker save -o ./.tar
```and loaded on a differe host:
```
docker load -i ./.tar
```### Run
#### Interactive
```
docker run --gpus all -ti /bin/bash
```## Notes
### Singularity container from Docker container
[Singularity](https://sylabs.io/singularity/) images can be easily created from local Docker images as follows:
```bash
sudo singularity build .sif docker-daemon://
```### `.dockerignore`
The `.dockerignore` file allows to ignore possible `*.tar` images (and other files) in the current directory, which would be included in the Docker context sent to the Docker deamon.
### Timenzone
Manual entry of the timezone is required when building containers. The following addition solves the issue:
```
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
```## Acknowledgement
The following people contributed code and/or knowledge not reported in the commit history:
* Irfan Alibay (@IAlibay)
* Sebastien Buchoux (@seb-buch)Their contributions is akcnowledged also in definition files, where appropriate.