Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pottava/docker-singularity
https://github.com/pottava/docker-singularity
docker-image singularity
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pottava/docker-singularity
- Owner: pottava
- Created: 2018-01-13T10:45:07.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T04:47:12.000Z (about 3 years ago)
- Last Synced: 2024-11-05T10:48:05.558Z (2 months ago)
- Topics: docker-image, singularity
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/pottava/singularity/
- Size: 19.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Singularity
http://singularity.lbl.gov/
[![pottava/singularity](http://dockeri.co/image/pottava/singularity)](https://hub.docker.com/r/pottava/singularity/)
## Supported tags and respective `Dockerfile` links:
・latest ([versions/3.9/Dockerfile](https://github.com/pottava/docker-singularity/blob/master/versions/3.9/Dockerfile))
・3.9 ([versions/3.9/Dockerfile](https://github.com/pottava/docker-singularity/blob/master/versions/3.9/Dockerfile))
・2.6 ([versions/2.6/Dockerfile](https://github.com/pottava/docker-singularity/blob/master/versions/2.6/Dockerfile))## Usage
### Test
```
$ docker run --rm pottava/singularity:3.9 --version
$ docker run --rm -it --privileged -v $(pwd):/work pottava/singularity:3.9 bash
```### Configure
Install docker and create a following shell script:
```
$ sudo sh -c 'cat << EOF > /usr/local/bin/singularity
#!/bin/sh
docker run --rm -it --privileged -e UID=\$(id -u) -e GID=\$(id -g) \\
-v /var/run/docker.sock:/var/run/docker.sock \\
-v /etc/localtime:/etc/localtime:ro \\
-v \$(pwd):/home/singularity -v /tmp:/tmp -w /home/singularity \\
pottava/singularity:3.9 "\$@"
EOF'
$ sudo chmod +x /usr/local/bin/singularity
```### Run
- v3.0 <= x
```
$ singularity pull --name hello.simg shub://vsoch/hello-world
$ sudo singularity run hello.simg
$ sudo singularity exec hello.simg ls
$ sudo singularity shell hello.simg
```- v2.4 <= x < v3.0
```
$ singularity pull --name hello.simg shub://vsoch/hello-world
$ singularity run hello.simg
$ singularity exec hello.simg ls
$ singularity shell hello.simg
```- < v2.3
```
$ docker run --rm -it --privileged -v $(pwd):/tmp \
--entrypoint sh pottava/singularity:2.3 -c \
"singularity create --size 100 alpine.simg && cp /work/alpine.simg /tmp/"
$ singularity import alpine.simg docker://alpine:3.7
$ singularity exec alpine.simg cat /etc/os-release
$ singularity shell alpine.simg
```