Skip to content

Commit

Permalink
Merge pull request #445 from n1hility/fix-scripts
Browse files Browse the repository at this point in the history
Make sure all scripts are included, fix template issues
  • Loading branch information
rhatdan authored May 2, 2024
2 parents 4742060 + a730e92 commit 454e987
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions training/nvidia-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,19 @@ RUN set -eu; mkdir -p /usr/ssh && \
RUN grep -q /usr/lib/containers/storage /etc/containers/storage.conf || \
sed -i -e '/additionalimage.*/a "/usr/lib/containers/storage",' \
/etc/containers/storage.conf && \
cp /run/.input/ilab /usr/local/bin/ilab
cp /run/.input/ilab* /usr/local/bin/


ARG INSTRUCTLAB_IMAGE
ARG INSTRUCTLAB_IMAGE_ID
ARG VLLM_IMAGE
ARG VLLM_IMAGE_ID
ARG TRAIN_IMAGE
ARG TRAIN_IMAGE_ID
ARG GPU_COUNT_COMMAND='nvidia-ctk --quiet cdi list | grep -P nvidia.com/gpu=\d+ | wc -l'
ARG GPU_COUNT_COMMAND='nvidia-ctk --quiet cdi list | grep -P nvidia.com/gpu=\\d+ | wc -l'

RUN for i in /usr/local/bin/ilab*; do \
sed -i 's/__REPLACE_TRAIN_DEVICE__/cudai/' $i; \
sed -i 's/__REPLACE_TRAIN_DEVICE__/cuda/' $i; \
sed -i 's/__REPLACE_CONTAINER_DEVICE__/nvidia.com\/gpu=all/' $i; \
sed -i "s%__REPLACE_IMAGE_NAME__%${INSTRUCTLAB_IMAGE}%" $i; \
sed -i "s%__REPLACE_VLLM_NAME__%${VLLM_IMAGE}%" $i; \
Expand Down

0 comments on commit 454e987

Please sign in to comment.