Skip to content

Commit

Permalink
Merge pull request #746 from pastequo/nvidia-bootc/retag-instructlab-…
Browse files Browse the repository at this point in the history
…image

feat(nvidia-bootc): Retag instructlab image if INSTRUCTLAB_IMAGE_RETAG is specified
  • Loading branch information
lmilbaum authored Aug 8, 2024
2 parents acb2b5d + 3d588a6 commit ddad890
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions training/nvidia-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ RUN chmod +x /usr/bin/ilab

ARG INSTRUCTLAB_IMAGE="quay.io/ai-lab/instructlab-nvidia:latest"
ARG INSTRUCTLAB_IMAGE_PULL_SECRET="instructlab-nvidia-pull"
ARG INSTRUCTLAB_IMAGE_RETAG

RUN for i in /usr/bin/ilab*; do \
sed -i 's/__REPLACE_TRAIN_DEVICE__/cuda/' $i; \
Expand All @@ -191,6 +192,11 @@ RUN --mount=type=secret,id=${INSTRUCTLAB_IMAGE_PULL_SECRET}/.dockerconfigjson \
else \
IID=$(sudo podman --root /usr/lib/containers/storage pull ${INSTRUCTLAB_IMAGE}); \
fi

RUN if [ ! -z "${INSTRUCTLAB_IMAGE_RETAG}" ]; then \
podman tag ${INSTRUCTLAB_IMAGE} ${INSTRUCTLAB_IMAGE%%:*}:${INSTRUCTLAB_IMAGE_RETAG}; \
fi

RUN podman system reset --force 2>/dev/null

LABEL image_version_id="${IMAGE_VERSION_ID}"

0 comments on commit ddad890

Please sign in to comment.