Skip to content

Commit 431faef

Browse files
committed
Fix hover message
1 parent b783d57 commit 431faef

File tree

1 file changed

+61
-54
lines changed

1 file changed

+61
-54
lines changed

docs/software/container-engine.md

Lines changed: 61 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ $ srun --environment=ubuntu --pty bash
5151
Click on the :fontawesome-solid-circle-plus: icon for information on each command.
5252

5353
```console
54-
[daint-ln002]$ srun --environment=ubuntu --pty bash (1)
54+
[daint-ln002]$ srun --environment=ubuntu --pty bash # (1)
5555

56-
[nid005333]$ pwd (2)
56+
[nid005333]$ pwd # (2)
5757
/capstor/scratch/cscs/<username>
5858

59-
[nid005333]$ cat /etc/os-release (3)
59+
[nid005333]$ cat /etc/os-release # (3)
6060
PRETTY_NAME="Ubuntu 24.04 LTS"
6161
NAME="Ubuntu"
6262
VERSION_ID="24.04"
6363
...
6464

65-
[nid005333]$ exit (4)
65+
[nid005333]$ exit # (4)
6666
[daint-ln002]$
6767
```
6868

@@ -199,7 +199,7 @@ After the import is complete, images are available in Squashfs format in the cur
199199
$ ls *.sqsh
200200
nvidia+cuda+11.8.0-cudnn8-devel-ubuntu22.04.sqsh
201201

202-
$ cat ${HOME}/.edf/example.toml (1)
202+
$ cat ${HOME}/.edf/example.toml # (1)
203203
image = "/capstor/scratch/cscs/${USER}/nvidia+cuda+11.8.0-cudnn8-devel-ubuntu22.04.sqsh"
204204
```
205205

@@ -218,71 +218,78 @@ After the import is complete, images are available in Squashfs format in the cur
218218
Since [public IPs are a shared resource][ref-guides-internet-access] we recommend authenticating even for publicly available images.
219219
For example, [Docker Hub applies its rate limits per user when authenticated](https://docs.docker.com/docker-hub/usage/).
220220

221-
To use an image from a different registry, the corresponding registry URL has to be prepended to the image reference, using a hash character (#) as a separator. For example:
221+
To use an image from a different registry, the corresponding registry URL has to be prepended to the image reference, using a hash character (#) as a separator:
222222

223-
```bash
224-
# Usage within an EDF
225-
> cat $HOME/.edf/nvhpc-23.7.toml
226-
image = "nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04"
223+
!!! example
224+
```bash
225+
# Usage within an EDF
226+
$ cat $HOME/.edf/nvhpc-23.7.toml
227+
image = "nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04"
227228

228-
# Usage on the command line
229-
> srun enroot import docker://nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04
230-
```
229+
# Usage on the command line
230+
$ enroot import docker://nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04
231+
```
231232

232233
To import images from private repositories, access credentials should be configured by individual users in the `$HOME/.config/enroot/.credentials` file, following the [netrc file format](https://everything.curl.dev/usingcurl/netrc).
233-
Using the `enroot import` documentation page as a reference, some examples could be:
234+
Using the `enroot import` documentation page as a reference:
235+
236+
??? example "`netrc` example"
237+
```bash
238+
# NVIDIA NGC catalog (both endpoints are required)
239+
machine nvcr.io login $oauthtoken password <token>
240+
machine authn.nvidia.com login $oauthtoken password <token>
241+
242+
# DockerHub
243+
machine auth.docker.io login <login> password <password>
244+
245+
# Google Container Registry with OAuth
246+
machine gcr.io login oauth2accesstoken password $(gcloud auth print-access-token)
247+
# Google Container Registry with JSON
248+
machine gcr.io login _json_key password $(jq -c '.' $GOOGLE_APPLICATION_CREDENTIALS | sed 's/ /\\u0020/g')
249+
250+
# Amazon Elastic Container Registry
251+
machine 12345.dkr.ecr.eu-west-2.amazonaws.com login AWS password $(aws ecr get-login-password --region eu-west-2)
252+
253+
# Azure Container Registry with ACR refresh token
254+
machine myregistry.azurecr.io login 00000000-0000-0000-0000-000000000000 password $(az acr login --name myregistry --expose-token --query accessToken | tr -d '"')
255+
# Azure Container Registry with ACR admin user
256+
machine myregistry.azurecr.io login myregistry password $(az acr credential show --name myregistry --subscription mysub --query passwords[0].value | tr -d '"')
257+
258+
# Github.com Container Registry (GITHUB_TOKEN needs read:packages scope)
259+
machine ghcr.io login <username> password <GITHUB_TOKEN>
260+
261+
# GitLab Container Registry (GITLAB_TOKEN needs a scope with read access to the container registry)
262+
# GitLab instances often use different domains for the registry and the authentication service, respectively
263+
# Two separate credential entries are required in such cases, for example:
264+
# Gitlab.com
265+
machine registry.gitlab.com login <username> password <GITLAB TOKEN>
266+
machine gitlab.com login <username> password <GITLAB TOKEN>
267+
268+
# ETH Zurich GitLab registry
269+
machine registry.ethz.ch login <username> password <GITLAB_TOKEN>
270+
machine gitlab.ethz.ch login <username> password <GITLAB_TOKEN>
271+
```
234272

235-
```bash
236-
# NVIDIA NGC catalog (both endpoints are required)
237-
machine nvcr.io login $oauthtoken password <token>
238-
machine authn.nvidia.com login $oauthtoken password <token>
239-
240-
# DockerHub
241-
machine auth.docker.io login <login> password <password>
242-
243-
# Google Container Registry with OAuth
244-
machine gcr.io login oauth2accesstoken password $(gcloud auth print-access-token)
245-
# Google Container Registry with JSON
246-
machine gcr.io login _json_key password $(jq -c '.' $GOOGLE_APPLICATION_CREDENTIALS | sed 's/ /\\u0020/g')
247-
248-
# Amazon Elastic Container Registry
249-
machine 12345.dkr.ecr.eu-west-2.amazonaws.com login AWS password $(aws ecr get-login-password --region eu-west-2)
250-
251-
# Azure Container Registry with ACR refresh token
252-
machine myregistry.azurecr.io login 00000000-0000-0000-0000-000000000000 password $(az acr login --name myregistry --expose-token --query accessToken | tr -d '"')
253-
# Azure Container Registry with ACR admin user
254-
machine myregistry.azurecr.io login myregistry password $(az acr credential show --name myregistry --subscription mysub --query passwords[0].value | tr -d '"')
255-
256-
# Github.com Container Registry (GITHUB_TOKEN needs read:packages scope)
257-
machine ghcr.io login <username> password <GITHUB_TOKEN>
258-
259-
# GitLab Container Registry (GITLAB_TOKEN needs a scope with read access to the container registry)
260-
# GitLab instances often use different domains for the registry and the authentication service, respectively
261-
# Two separate credential entries are required in such cases, for example:
262-
# Gitlab.com
263-
machine registry.gitlab.com login <username> password <GITLAB TOKEN>
264-
machine gitlab.com login <username> password <GITLAB TOKEN>
265-
266-
# ETH Zurich GitLab registry
267-
machine registry.ethz.ch login <username> password <GITLAB_TOKEN>
268-
machine gitlab.ethz.ch login <username> password <GITLAB_TOKEN>
269-
```
270273
[](){#ref-ce-annotations}
271274
## Annotations
272275

273-
Annotations define arbitrary metadata for containers in the form of key-value pairs. Within the EDF, annotations are designed to be similar in appearance and behavior to those defined by the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/config.md#annotations). Annotation keys usually express a hierarchical namespace structure, with domains separated by "." (full stop) characters.
276+
Annotations define arbitrary metadata for containers in the form of key-value pairs.
277+
Within the EDF, annotations are designed to be similar in appearance and behavior to those defined by the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/config.md#annotations).
278+
Annotation keys usually express a hierarchical namespace structure, with domains separated by "." (full stop) characters.
274279

275-
As annotations are often used to control hooks, they have a deep nesting level. For example, to execute the [SSH hook][ref-ce-ssh-hook] described below, the annotation `com.hooks.ssh.enabled` must be set to the string `true`.
280+
As annotations are often used to control hooks, they have a deep nesting level.
281+
For example, to execute the [SSH hook][ref-ce-ssh-hook] described below, the annotation `com.hooks.ssh.enabled` must be set to the string `true`.
276282

277-
EDF files support setting annotations through the `annotations` table. This can be done in multiple ways in TOML: for example, both of the following usages are equivalent:
283+
EDF files support setting annotations through the `annotations` table.
284+
This can be done in multiple ways in TOML: for example, both of the following usages are equivalent:
278285

279-
* Case: nest levels in the TOML key.
286+
!!! example "Nest levels in the TOML key"
280287
```bash
281288
[annotations]
282289
com.hooks.ssh.enabled = "true"
283290
```
284291

285-
* Case: nest levels in the TOML table name.
292+
!!! example "Nest levels in the TOML table name"
286293
```bash
287294
[annotations.com.hooks.ssh]
288295
enabled = "true"

0 commit comments

Comments
 (0)