Skip to content

Commit

Permalink
Add example for enroot and Amazon ECR (#44)
Browse files Browse the repository at this point in the history
Close #9
  • Loading branch information
mhuguesaws authored Sep 18, 2024
1 parent e139b55 commit 1d25489
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions pyxis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,27 @@ Include the following in your [HeadNode](https://docs.aws.amazon.com/parallelclu
# Private docker registry
Enroot supports [private docker registry](https://github.com/NVIDIA/enroot/blob/9c6e979059699e93cfc1cce0967b78e54ad0e263/doc/cmd/import.md#description), [AWS ECR](https://aws.amazon.com/ecr/) among others. You can define your own config file that has to be placed on `ENROOT_CONFIG_PATH` from `enroot.template.conf`.

For example, Amazon ECR requires authentication to pull containers.
You will need to define credentials in `$HOME/.config/enroot/.crendentials`.

```txt
machine 159553542841.dkr.ecr.us-west-2.amazonaws.com login AWS password $(aws ecr get-login-password --region us-west-2)
```

You will then be able to import container images from Amazon ECR with enroot:

```bash
enroot import docker://159553542841.dkr.ecr.us-west-2.amazonaws.com/nccl-tests:efa1.34.0-ofiv1.11.0-aws-ncclv2.23.4-1-testsv2.13.10
```

Expected output
```txt
[INFO] Querying registry for permission grant
[INFO] Authenticating with user: AWS
[INFO] Using credentials from file: /home/maxhaws/.config/enroot/.credentials
[INFO] Authentication succeeded
[INFO] Fetching image manifest list
[INFO] Fetching image manifest
[INFO] Downloading 1 missing layers...
```
2 changes: 1 addition & 1 deletion pyxis/enroot.template.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ENROOT_LIBRARY_PATH /usr/lib/enroot
#ENROOT_SYSCONF_PATH /etc/enroot
ENROOT_RUNTIME_PATH /tmp/enroot/user-$(id -u)
ENROOT_CONFIG_PATH ${ENROOT_CONFIG_PATH}
ENROOT_CONFIG_PATH $HOME/.config/enroot
ENROOT_CACHE_PATH ${ENROOT_CACHE_PATH}
ENROOT_DATA_PATH /tmp/enroot/data/user-$(id -u)
#ENROOT_TEMP_PATH ${TMPDIR:-/tmp}
Expand Down

0 comments on commit 1d25489

Please sign in to comment.