-
Notifications
You must be signed in to change notification settings - Fork 49
Feature/getting started improvements #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 6 commits
ee7e6ba
688f4be
e252b2f
3f31b26
d811510
6516211
68f0bf5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,42 @@ toc: false | |
## Installation Quick Start | ||
|
||
```bash | ||
git clone {{ site.repo }}.git | ||
cd singularity | ||
./autogen.sh | ||
./configure --prefix=/usr/local | ||
make | ||
sudo make install | ||
$ git clone {{ site.repo }}.git | ||
$ cd singularity | ||
$ ./autogen.sh | ||
$ ./configure --prefix=/usr/local | ||
$ make | ||
$ sudo make install | ||
``` | ||
|
||
## Command Quick Start | ||
|
||
### Create a Centos7 image from a CentOS host | ||
|
||
It's easiest to build an image on a "compatible" host. Here's a quick | ||
recipe to build a CentOS 7 image on a CentOS host. See | ||
the [bootstrapping section][readme-bootstrapping] of the README for | ||
the full story and the [tutorials] for deeper advice. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto here I think |
||
1. Create a file named `centos.def` that contains the following lines. | ||
|
||
``` | ||
BootStrap: yum | ||
OSVersion: 7 | ||
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/ | ||
Include: yum | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really like this change to the Quickstart, but instead of doing Centos 7, could we do a technology that more users are familiar with, Docker? So provide an example of |
||
2. Create and bootstrap the image: | ||
|
||
```bash | ||
$ sudo singularity create /tmp/Centos7.img | ||
$ sudo singularity bootstrap /tmp/Centos7.img centos.def | ||
``` | ||
|
||
### Shell into container | ||
```bash | ||
singularity shell --contain /tmp/Centos7.img | ||
$ singularity shell --contain /tmp/Centos7.img | ||
Singularity.Centos7.img> ps aux | ||
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | ||
gmk 1 0.0 0.3 115372 1768 pts/6 S 12:23 0:00 /bin/bash --norc --noprofile | ||
|
@@ -32,35 +55,37 @@ Singularity.Centos7.img> exit | |
### I am the same user inside the container as outside the container | ||
|
||
```bash | ||
id | ||
$ id | ||
uid=1000(gmk) gid=1000(gmk) groups=1000(gmk),10(wheel),2222(testgroup) | ||
singularity exec /tmp/Centos7.img id | ||
$ singularity exec /tmp/Centos7.img id | ||
uid=1000(gmk) gid=1000(gmk) groups=1000(gmk),10(wheel),2222(testgroup) | ||
```` | ||
|
||
### Files on the host can be reachable from within the container | ||
```bash | ||
echo "Hello World" > /home/gmk/testfile | ||
singularity exec /tmp/Centos7.img cat /home/gmk/testfile | ||
$ echo "Hello World" > /home/gmk/testfile | ||
$ singularity exec /tmp/Centos7.img cat /home/gmk/testfile | ||
Hello World | ||
```` | ||
|
||
### Switching operating systems is as easy as pointing to a different image! | ||
```bash | ||
singularity exec /tmp/Centos7.img cat /etc/redhat-release | ||
$ singularity exec /tmp/Centos7.img cat /etc/redhat-release | ||
CentOS Linux release 7.2.1511 (Core) | ||
|
||
singularity exec /tmp/SL6.img cat /etc/redhat-release | ||
$ singularity exec /tmp/SL6.img cat /etc/redhat-release | ||
Scientific Linux release 6.8 (Carbon) | ||
|
||
singularity exec /tmp/Debian-stable.img cat /etc/debian_version | ||
$ singularity exec /tmp/Debian-stable.img cat /etc/debian_version | ||
8.5 | ||
|
||
singularity exec /tmp/Ubuntu-trusty.img cat /etc/lsb-release | ||
$ singularity exec /tmp/Ubuntu-trusty.img cat /etc/lsb-release | ||
DISTRIB_ID=Ubuntu | ||
DISTRIB_RELEASE=14.04 | ||
DISTRIB_CODENAME=trusty | ||
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS" | ||
```` | ||
|
||
{% include links.html %} | ||
|
||
[readme-bootstrapping]: https://github.com/singularityware/singularity/blob/master/README.md#bootstrapping-new-images | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh oups, disregard my previous comment... forgot about this :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll have to put the full URL to the README here, this will likely lead to a 404.