-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle multi-arch container images (#315)
Closes #263. See also #309 for other fixes to the pipeline that relies on these helpers. --------- Co-authored-by: Terry Kong <[email protected]>
- Loading branch information
Showing
5 changed files
with
15 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#!/bin/bash | ||
|
||
source $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/inspect_remote_img.sh | ||
get_build_date() { | ||
if [[ $# -ne 2 ]]; then | ||
echo 'get_build_date $GH_TOKEN $IMAGE' | ||
echo 'Example: get_build_date XXXXXXXXXXXX ghcr.io/nvidia/t5x:latest' | ||
if [[ $# -ne 3 ]]; then | ||
echo 'get_build_date $IMAGE $OS $ARCH' | ||
echo 'Example: get_build_date ghcr.io/nvidia/upstream-t5x:latest linux amd64' | ||
echo 'Returns the BUILD_DATE of a tagged remote image (no download)' | ||
return 1 | ||
fi | ||
inspect_remote_img $@ | jq -r '.config.Labels["org.opencontainers.image.created"]' | ||
skopeo inspect --override-arch "${3}" --override-os "${2}" "docker://${1}" | jq -r '.Labels["org.opencontainers.image.created"]' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/inspect_remote_img.sh | ||
get_remote_env() { | ||
if [[ $# -ne 2 ]]; then | ||
echo 'get_remote_env $GH_TOKEN $IMAGE' | ||
echo 'Example: get_remote_env XXXXXXXXXXXX ghcr.io/nvidia/t5x:latest' | ||
if [[ $# -ne 3 ]]; then | ||
echo 'get_remote_env $IMAGE $OS $ARCH' | ||
echo 'Example: get_remote_env ghcr.io/nvidia/upstream-t5x:latest linux amd64' | ||
echo 'Returns the ENV of a tagged remote image (no download)' | ||
echo 'Useful to inspect CUDA env vars' | ||
return 1 | ||
fi | ||
inspect_remote_img $@ | jq .config.Env | ||
skopeo inspect --override-arch "${3}" --override-os "${2}" "docker://${1}" | jq -r '.Env' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#!/bin/bash | ||
|
||
source $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/inspect_remote_img.sh | ||
get_remote_labels() { | ||
if [[ $# -ne 2 ]]; then | ||
echo '[get_remote_labels](./get_remote_labels.sh) $GH_TOKEN $IMAGE' | ||
echo 'Example: get_remote_labels XXXXXXXXXXXX ghcr.io/nvidia/t5x:latest' | ||
if [[ $# -ne 3 ]]; then | ||
echo 'get_remote_labels $IMAGE $OS $ARCH' | ||
echo 'Example: get_remote_labels ghcr.io/nvidia/upstream-t5x:latest linux amd64' | ||
echo 'Returns the opencontainer annotation labels of a tagged remote image (no download)' | ||
return 1 | ||
fi | ||
inspect_remote_img $@ | jq .config.Labels | ||
skopeo inspect --override-arch "${3}" --override-os "${2}" "docker://${1}" | jq -r '.Labels' | ||
} |
This file was deleted.
Oops, something went wrong.