3 changed files with 45 additions and 0 deletions
@ -0,0 +1 @@ |
|||
auth.json |
|||
@ -0,0 +1,10 @@ |
|||
FROM nvcr.io/nvidia/base/ubuntu |
|||
|
|||
RUN <<EOF |
|||
set -Eeu |
|||
export DEBIAN_FRONTEND=noninteractive |
|||
apt-get update |
|||
apt-get install -y --no-install-recommends bc bzip2 can-utils ca-certificates gnupg2 gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools i2c-tools iw kbd kmod language-pack-en-base libcanberra-gtk3-module libdrm-dev libgles2 libglvnd-dev libgtk-3-0 libpython2.7 libudev1 libvulkan1 libzmq5 mtd-utils parted pciutils python-is-python3 python3 python3-pexpect python3-distutils python3-numpy sox udev vulkan-tools wget wireless-tools wpasupplicant |
|||
rm -rf /var/lib/apt/lists/* |
|||
apt-get clean |
|||
EOF |
|||
@ -0,0 +1,34 @@ |
|||
#!/bin/bash |
|||
|
|||
set -Eeuo pipefail |
|||
|
|||
ARM64_BASE_IMAGE="nvcr.io/nvidia/l4t-jetpack:r36.4.0" |
|||
AMD64_BASE_IMAGE="nvcr.io/nvidia/base/ubuntu:22.04_20240212" |
|||
TARGET_IMAGE="quay.io/nmasse-redhat/jetpack-multiarch:r36.4.0" |
|||
|
|||
# Login to registries |
|||
export REGISTRY_AUTH_FILE="$PWD/auth.json" |
|||
if [ ! -f "$REGISTRY_AUTH_FILE" ]; then |
|||
echo "Logging in nvcr.io registry" |
|||
podman login nvcr.io |
|||
echo "Logging in quay.io registry" |
|||
podman login quay.io |
|||
echo "Done" |
|||
read -p "Press enter to continue " |
|||
fi |
|||
|
|||
# Fetch the ARM64 image from Nvidia |
|||
podman pull --platform linux/arm64/v8 "$ARM64_BASE_IMAGE" |
|||
podman tag "$ARM64_BASE_IMAGE" localhost/base-image-aarch64 |
|||
|
|||
# Package a similar version for x86 without all the CUDA libraries |
|||
podman pull --platform linux/amd64 "$AMD64_BASE_IMAGE" |
|||
buildah build --platform linux/amd64 --from "$AMD64_BASE_IMAGE" -t localhost/base-image-x86_64 . |
|||
|
|||
if podman manifest exists localhost/base-image; then |
|||
podman manifest rm localhost/base-image |
|||
fi |
|||
podman manifest create localhost/base-image |
|||
podman manifest add localhost/base-image localhost/base-image-x86_64 |
|||
podman manifest add localhost/base-image localhost/base-image-aarch64 |
|||
podman manifest push localhost/base-image "$TARGET_IMAGE" |
|||
Loading…
Reference in new issue