From 735c8bd90766b1ce339e38892ccc8ff9eb700a28 Mon Sep 17 00:00:00 2001 From: Matthieu Bernardin Date: Thu, 25 Jul 2024 16:44:35 +0200 Subject: [PATCH] feat(nvidia-bootc): Introduce INSTRUCTLAB_IMAGE_PULL_SECRET as build-arg for Konflux build Signed-off-by: Matthieu Bernardin --- training/nvidia-bootc/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/training/nvidia-bootc/Containerfile b/training/nvidia-bootc/Containerfile index 210ec013..90a30a79 100644 --- a/training/nvidia-bootc/Containerfile +++ b/training/nvidia-bootc/Containerfile @@ -196,6 +196,7 @@ RUN grep -q /usr/lib/containers/storage /etc/containers/storage.conf || \ && chmod +x /usr/bin/ilab ARG INSTRUCTLAB_IMAGE="quay.io/ai-lab/instructlab-nvidia:latest" +ARG INSTRUCTLAB_IMAGE_PULL_SECRET="instructlab-nvidia-pull" RUN for i in /usr/bin/ilab*; do \ sed -i 's/__REPLACE_TRAIN_DEVICE__/cuda/' $i; \ @@ -210,7 +211,7 @@ RUN --mount=type=secret,id=instructlab-nvidia-pull/.dockerconfigjson \ if [ -f "/run/.input/instructlab-nvidia/oci-layout" ]; then \ IID=$(podman --root /usr/lib/containers/storage pull oci:/run/.input/instructlab-nvidia) && \ podman --root /usr/lib/containers/storage image tag ${IID} ${INSTRUCTLAB_IMAGE}; \ - elif [ -f "/run/secrets/instructlab-nvidia-pull/.dockerconfigjson" ]; then \ + elif [ -f "/run/secrets/${INSTRUCTLAB_IMAGE_PULL_SECRET}/.dockerconfigjson" ]; then \ IID=$(sudo podman --root /usr/lib/containers/storage pull --authfile /run/secrets/instructlab-nvidia-pull/.dockerconfigjson ${INSTRUCTLAB_IMAGE}); \ else \ IID=$(sudo podman --root /usr/lib/containers/storage pull ${INSTRUCTLAB_IMAGE}); \