Skip to content

Commit 7cab358

Browse files
committed
just doing a standard git pull upstream master results in merge??
2 parents 1f75af0 + e281211 commit 7cab358

7 files changed

Lines changed: 160 additions & 5 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "Announcement: Problem downloading from Docker Hub to be resolved soon"
3+
category: news
4+
permalink: 2017-docker-problem
5+
---
6+
7+
To all Singularity users,
8+
9+
On Tuesday September 12, Docker released a new version of Docker image metadata. This means that any new images built on Docker Hub cannot currently be downloaded using a singularity `pull` or other commands like `shell`, `exec`, and `bootstrap` when updated Docker registries are queried.
10+
11+
Vanessa (`@v`) has created an interim fix for the problem and we have merged it into the development branch. Pending further testing we plan to merge this fix into master and create a new minor release (2.3.2). We will make another announcement as soon as it is ready to install.
12+
13+
Thanks for your patience!
14+
15+
The Singularity team
16+
17+
{% include links.html %}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "Standard Container Integration Format (SCI-F) Final Draft"
3+
category: news
4+
permalink: 2017-scif-contribute
5+
---
6+
7+
Hi Singularity Community!
8+
9+
Thanks to everyone that provided comments on the early draft for SCI-F. The goals were initially:
10+
11+
- write specification draft (this was done via a Google Doc)
12+
- implement into Singularity (now in [development branch](https://github.com/singularityware/singularityware.github.io/blob/docs/2.4/pages/docs/user-docs/docs-apps.md))
13+
- get feedback on both, adjust implementation and draft
14+
- do several (N=4) implemented use cases for SCI-F, write up ([available here](http://containers-ftw.org/apps/category/#Example))
15+
- make an interactive, open source repository to contribute and share SCI-F apps [http://containers-ftw.org/apps/](http://containers-ftw.org/apps/)
16+
- write up the (almost) "final" draft formally [http://containers-ftw.org/SCI-F/](http://containers-ftw.org/SCI-F/)
17+
18+
I'm (`@vsoch`) happy to report that I've finished the above, and I'd like to ask the following:
19+
20+
- if you contributed, please check the AUTHORS file in the SCI-F repository to make sure that I added you, and spelled your name correctly (apologies in advance).
21+
- Any further suggestions, additions, or entire new contributions can be added to the draft by way of pull request. I'm not in any rush, and if you have a good contribution, I want to help.
22+
- If you have not contributed yet and would like to, see the ideas linked on the [draft abstract page](http://containers-ftw.org/SCI-F/).
23+
24+
The plan is (as of now) to submit this no later than the end of October, and I want to make sure everyone that wants to contribute has had ample chance. Indeed, with Singularity there are many ways to cook your container, and SCi-F definitely exemplifies that.
25+
26+
![egg](/images/logo/three-ways.png)
27+
28+
Thanks again everyone!
29+
30+
{% include links.html %}

_posts/recipes/2017-01-26-singularity-hub-tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The easiest thing to do is to install Singularity on your local workstation:
3030
sudo make install
3131
```
3232

33-
If you have the unfortunate situation of using a Mac, or just need a virtual machine, then you will want to follow the instructions <a href="http://singularity.lbl.gov/install-mac" target="_blank">here</a>. Basically, you need to install vagrant, virtual box, and then do this:
33+
If you are using a Mac, or just need a virtual machine, then you will want to follow the instructions <a href="http://singularity.lbl.gov/install-mac" target="_blank">here</a>. Basically, you need to install vagrant, virtual box, and then do this:
3434

3535
```bash
3636
vagrant init ubuntu/trusty64
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: "Singularity 2.3.2 Quick Fix Release"
3+
category: releases
4+
permalink: "release-2-3-2"
5+
targz: "2.3.2.tar.gz"
6+
---
7+
8+
<a target="_blank" href="https://github.com/singularityware/singularity/releases/tag/2.3.2">Release 2.3.2 </a> This dot release includes a fix for a change that Docker implemented to their registry RESTful API which broke compatibility with Singularity (among several other low minor fixes).
9+
10+
11+
## What happened?
12+
13+
14+
**Where does Docker image metadata come from?**
15+
The Docker Registry serves metadata about images via manifests, where each image has a manifest that tells Singularity important information like environment, labels, and entrypoints and running command. Importantly, the image manifest serves the actual layers that should be obtained to create the image. The manifests come in different flavors, or schema versions. Version 1 serves the primary load of metadata (labels, environment) while the first release of version 2 served layers, and had the addition of size. This addition made it possible to pull an image with Singularity and calculate the size on the fly for images generated with support for this manifest.
16+
17+
Singularity had an old default to retrieve the version 2 (done by way of a header asking for it), and ask it for layers. If the remote registry could only offer version 1, we were still able to obtain a list of layers (under a different key, `fsLayers` instead of `layers`) and metadata via the older (schema 1) manifest. However, with the update, the API version 2 schema can now return a <a href="https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list"> list of manifests</a>. This meant that when we checked the response for the keys `layers` or `fslayers`, they wouldn't be found, becaues we needed to look under `manifests`, and then do a second call to retrieve the manifest of interest based on a system architecture and OS. This of course broke most `import`, `shell`, `pull`, `exec`, because all of these commands require retrieving the layers.
18+
19+
## The Patch
20+
A super quick fix would have been to fall back to the version 1 manifest, always, but then we would lose the automatic calculation of size, which is important to many users. The "better" fix is obvious - the code needs to:
21+
22+
- check for a `manifests` key
23+
- if found, select a default manifest to use
24+
- retrieve it, and continue!
25+
- if not found, fall back to version 1
26+
27+
This means that we've added environment variables `SINGULARITY_DOCKER_OS` and `SINGULARITY_DOCKER_ARCHITECTURE` to specify this choice, with defaults `linux` and `amd64`. This is a pretty exciting change, because it means down the line you (as a user!) can specify the specifics of the layers you want returned, given an image that has this metadata available. We can see the fix running as follows:
28+
29+
30+
```
31+
DEBUG
32+
*** STARTING DOCKER IMPORT PYTHON ****
33+
```
34+
This is the initialization of the Docker client, it's parsing the image name provided
35+
```
36+
DEBUG Starting Docker IMPORT, includes env, runscript, and metadata.
37+
VERBOSE Docker image: ubuntu:14.04
38+
VERBOSE2 Specified Docker ENTRYPOINT as %runscript.
39+
DEBUG Headers found: Content-Type,Accept
40+
VERBOSE Registry: index.docker.io
41+
VERBOSE Namespace: library
42+
VERBOSE Repo Name: ubuntu
43+
VERBOSE Repo Tag: 14.04
44+
VERBOSE Version: None
45+
```
46+
The initial poke to Docker hub asks for tags, to determine if we need some kind of token
47+
```
48+
VERBOSE Obtaining tags: https://index.docker.io/v2/library/ubuntu/tags/list
49+
DEBUG GET https://index.docker.io/v2/library/ubuntu/tags/list
50+
```
51+
52+
401 means that we do, and with the response the API sends back the scope and other details we need to make to request it
53+
54+
```
55+
DEBUG Http Error with code 401
56+
```
57+
58+
Here we are requesting it
59+
```
60+
DEBUG GET https://auth.docker.io/token?service=registry.docker.io&expires_in=9000&scope=repository:library/ubuntu:pull
61+
DEBUG Headers found: Content-Type,Authorization,Accept
62+
```
63+
64+
And here is the new bit. Instead of blindly doing one call, we have a function to update two versions of the manifest - the older (with metadata) and some version of the newer (with layers and size) with a fallback to use the version 1
65+
```
66+
DEBUG Updating manifests.
67+
68+
# Here is version 2+
69+
DEBUG MANIFEST (Primary): not found, making initial call.
70+
VERBOSE Obtaining manifest: https://index.docker.io/v2/library/busybox/manifests/latest
71+
DEBUG GET https://index.docker.io/v2/library/busybox/manifests/latest
72+
73+
# Here is version 1 (Metadata)
74+
DEBUG MANIFEST (Metadata): not found, making initial call.
75+
VERBOSE Obtaining manifest: https://index.docker.io/v2/library/busybox/manifests/latest
76+
DEBUG GET https://index.docker.io/v2/library/busybox/manifests/latest
77+
```
78+
Notice that the two calls are the same - that's because the headers are actually different, to request different ones.
79+
80+
And here is the (new) indication that we found a list
81+
```
82+
DEBUG Image manifest version 2.2 list found.
83+
```
84+
Here is the default architecture / os
85+
```
86+
DEBUG Obtaining architecture: amd64, OS: linux
87+
```
88+
And the specific call to get it
89+
```
90+
VERBOSE Obtaining manifest: https://index.docker.io/v2/library/busybox/manifests/sha256:030fcb92e1487b18c974784dcc110a93147c9fc402188370fbfd17efabffc6af
91+
DEBUG GET https://index.docker.io/v2/library/busybox/manifests/sha256:030fcb92e1487b18c974784dcc110a93147c9fc402188370fbfd17efabffc6af
92+
```
93+
94+
With this fix - we can again use `pull`/`import`, etc, and also have a working `singularity pull docker://busybox` that estimates the size automatically.
95+
96+
Please report any additional bugs to <a target="_blank" href="https://github.com/singularityware/singularity/issues/new">our issues board.</a>

images/logo/three-ways.png

222 KB
Loading

pages/docs/overview/faq.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This nomenclature represented that all files within the environment were contain
1616

1717
### Which namespaces are virtualized? Is that select-able?
1818

19-
The goal of Singularity is to run an application within a contained environment such as it was not contained. Thus there is a balance between what to separate and what not to separate. At present the virtualized namespaces are process, mount points, and certain parts of the contained file system.
19+
The goal of Singularity is to run an application within a contained environment as if it was not contained. Thus there is a balance between what to separate and what not to separate. At present the virtualized namespaces are process, mount points, and certain parts of the contained file system.
2020

2121
When you run your Singularity container, you may find that the process IDs start with 1 (one) and increment from there. You will also find that while the file system is contained starting with '/' (root), you can have access outside the container via your starting path. This means that relative paths will resolve outside the container, and fully qualified paths will resolve inside the container.
2222

@@ -25,10 +25,10 @@ To achieve this behavior, you will find that several Linux namespaces are separa
2525

2626
### Can't you do this with Docker?
2727

28-
No, not even close. If that was true, there would be no use for Singularity. But in fact, Singularity has taken off within the scientific computing world! Furthermore, if Docker can be used on traditional HPC resources, it would be; but it is not! There are no HPC centers utilizing Docker on their traditional HPC resources because it is inheritiatnly incompatible with HPC.
28+
No, not even close. If that was true, there would be no use for Singularity. But in fact, Singularity has taken off within the scientific computing world! Furthermore, if Docker can be used on traditional HPC resources, it would be; but it is not! There are no HPC centers utilizing Docker on their traditional HPC resources because it is inherently incompatible with HPC.
2929

30-
Singularity has a very different usage model then Docker in that Singularity utilizes complete image files while Docker containers are made up of layers of tar files. With Singularity, you can prefetch an entire container, cache it on shared optimized storage, and run it from there. Singularity also limits user privileges and access from within the container, making it safe for
31-
user's to bring their own containers. It doesn't open up security risks of users being able to control a root owned daemon, and it integrates seemlessly into existing process and resource manager workflows, supports GPU, MPI, architecture independent, among lots of other aspects that Docker does not.
30+
Singularity has a very different usage model than Docker in that Singularity utilizes complete image files while Docker containers are made up of layers of tar files. With Singularity, you can prefetch an entire container, cache it on shared optimized storage, and run it from there. Singularity also limits user privileges and access from within the container, making it safe for
31+
users to bring their own containers. It doesn't open up security risks of users being able to control a root owned daemon, and it integrates seemlessly into existing process and resource manager workflows, supports GPU, MPI, architecture independence, among lots of other aspects that Docker does not.
3232

3333
In the end, Docker is designed for micro-service network virtulization and emulation of the full isolation requirements in the legacy of full machine level virtualization platforms (e.g. VMWare, Xen, KVM, etc.). Singularity is designed specifically for the scentific, application and environment virtulization. The right tool for the right job. :)
3434

pages/docs/user-docs/docs-pull.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ Progress |===================================| 100.0%
8181
Done. Container is at: /tmp/vsoch-hello-world-master.img
8282
```
8383

84+
### Pull by commit
85+
You can also pull different versions of your container by using their commit id (`version`).
86+
87+
```
88+
singularity pull shub://vsoch/hello-world@42e1f04ed80217895f8c960bdde6bef4d34fab59
89+
Progress |===================================| 100.0%
90+
Done. Container is at: ./vsoch-hello-world-master.img
91+
```
92+
93+
In this example, the first build of this container will be pulled.
94+
95+
8496
## Docker
8597
Docker pull is similar (on the surface) to a Singularity Hub pull, and we would do the following:
8698

0 commit comments

Comments
 (0)