Skip to content

Commit

Permalink
Merge pull request #699 from pastequo/nvidia-bootc/fix/pull-secret
Browse files Browse the repository at this point in the history
feat(nvidia-bootc): Introduce INSTRUCTLAB_IMAGE_PULL_SECRET
  • Loading branch information
rhatdan authored Jul 25, 2024
2 parents f3cd9b5 + 735c8bd commit 85249c0
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 @@ -193,6 +193,7 @@ COPY duplicated/ilab-wrapper/ilab /usr/bin/ilab
RUN 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 @@ -207,7 +208,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 85249c0

Please sign in to comment.