Skip to content

Conversation

@GodloveD
Copy link
Contributor

Changes proposed in this pull request

  • added a bunch of asciicasts
  • made a bunch of edits
  • removed some content that was not related to the create command

@singularityware-admin

@vsoch
Copy link
Member

vsoch commented Apr 16, 2017

previewing now!

---

Singularity images are single files which physically contain the container. Unlike Docker that puts images together from layers, abstractly shown on your computer with `docker -ps`, a Singularity image is just a file that can be sitting on your Desktop, in a folder on your cluster, or elsewhere.
A Singularity image is a single file that contains a virtual file system. It is the basis for a Singularity container. After creating an image, you can install an operating system, applications, and save meta-data into it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one bit sounds strange to me, because the file is the image is the container. What about something like:

A Singularity image, which can be referred to as a "container," is a single file that contains a virtual file system. After creating an image you can install an operating system, applications, and save meta-data with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

A Singularity image is a single file that contains a virtual file system. It is the basis for a Singularity container. After creating an image, you can install an operating system, applications, and save meta-data into it.

The effect of all files existing virtually within a single image greatly simplifies sharing, copying, branching, and other management tasks. It also means that standard file system ACLs apply to access and permission to the container (e.g. I can give read only access to a colleague, or block access completely with a simple chmod command).
Whereas Docker assembles images from layers (which are stored on your computer in a hidden directory and can be viewed with the `docker -ps` command), a Singularity image is just one file that can sit on your Desktop, in a folder on your cluster, or anywhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A slight tweak here, maybe...

Whereas Docker assembles images from layers that are stored in on your computer (viewed with the docker -ps command), a Singularity image is just one file that can sit on your Desktop, in a folder on your cluster, or anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

The effect of all files existing virtually within a single image greatly simplifies sharing, copying, branching, and other management tasks. It also means that standard file system ACLs apply to access and permission to the container (e.g. I can give read only access to a colleague, or block access completely with a simple chmod command).
Whereas Docker assembles images from layers (which are stored on your computer in a hidden directory and can be viewed with the `docker -ps` command), a Singularity image is just one file that can sit on your Desktop, in a folder on your cluster, or anywhere.

Having Singularity containers housed within a single image file greatly simplifies management tasks such as sharing, copying, and branching your containers. It also means that standard Linux file system concepts like permissions, ownership, and ACLs apply to the container (e.g. I can give read only access to a colleague, or block access completely with a simple chmod command).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds great.

```bash
$singularity mount container.img /mnt
## Increasing the size of an existing image
You can increase the size of an image after it has been instantiated by using the 'expand' Singularity sub-command as follows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think expand is in the single quote instead of the weird expand character, it doesn't render in grey like it should:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the catch

{% include asciicast.html source='docs-create-expand.js' title='How to expand images' author='[email protected]'%}

## Mounting an image
Once the image has been created, you can mount it to an existing directory like so:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add a quick rationale here for why a user would want to mount, because I was confused for a while and it's not readily apparent. Maybe something like:

While it's easy to shell into an image that is finished:

singularity shell container.img

or do the same with --writable to make changes:

sudo singularity shell --writable container.img

it may be the case that you want to view the container in a file browser. In this case, you would want to use the mount command to get direct access to the file system, and you can do this even if the image has not been completed yet (and shell would not work). This is a handy tool for development, or general inspection of your image.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we might want to mention why you would use mount instead of shell, but I think it should be brief and not contain commands that the user may not have encountered yet. I'll make and submit a change and see what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah just seeing this! I didn't refresh my page. Sounds good.

@vsoch
Copy link
Member

vsoch commented Apr 16, 2017

once we merge this guy, I have an idea for adding a copy functionality to bits of code. Let me know when you are ready for a second look over!

A Singularity image, which can be referred to as a "container," is a single file that contains a virtual file system. After creating an image you can install an operating system, applications, and save meta-data with it.

Whereas Docker assembles images from layers (which are stored on your computer in a hidden directory and can be viewed with the `docker -ps` command), a Singularity image is just one file that can sit on your Desktop, in a folder on your cluster, or anywhere.
Whereas Docker assembles images from layers that are stored in on your computer (viewed with the docker -ps command), a Singularity image is just one file that can sit on your Desktop, in a folder on your cluster, or anywhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like one extra in or on here ( I do this all the time!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@vsoch
Copy link
Member

vsoch commented Apr 16, 2017

smacktabulous!! Merging.

@vsoch vsoch merged commit 8d3c86b into singularityware:docs/2.3 Apr 16, 2017
@GodloveD
Copy link
Contributor Author

GodloveD commented Apr 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants