Skip to content

Commit

Permalink
feat(nvidia-bootc): Introduce INSTRUCTLAB_IMAGE_PULL_SECRET as build-…
Browse files Browse the repository at this point in the history
…arg for Konflux build

Signed-off-by: Matthieu Bernardin <[email protected]>
  • Loading branch information
pastequo committed Jul 25, 2024
1 parent f6ed0b3 commit 735c8bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion training/nvidia-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -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}); \
Expand Down

0 comments on commit 735c8bd

Please sign in to comment.