Skip to content

Commit

Permalink
Merge pull request #631 from javipolo/fix-model-targets
Browse files Browse the repository at this point in the history
Fix model targets
  • Loading branch information
rhatdan authored Jun 26, 2024
2 parents 98b01c6 + c290eb1 commit 85da91d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions training/model/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.access.redhat.com/ubi9/ubi
RUN dnf install -y python3-pip && python3 -m pip install huggingface_hub[cli]
COPY entrypoint.sh /download
COPY entrypoint.sh /entrypoint.sh
WORKDIR /download
ENTRYPOINT ["bash" "/download/entrypoint.sh"]
ENTRYPOINT ["bash", "/entrypoint.sh"]
3 changes: 2 additions & 1 deletion training/model/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ generate-model-cfile: download
-v $(COMMON_PATH):/work:z \
-v ${OUTDIR}:/run/.input:ro \
--pull=never \
--entrypoint python3 \
$(REGISTRY)/$(REGISTRY_ORG)/model-downloader:latest \
python3 /work/generate-model-cfile.py /run/.input/models >> ${MODELS_CONTAINERFILE}
/work/generate-model-cfile.py /run/.input/models >> ${MODELS_CONTAINERFILE}

.PHONY: bootc-models
bootc-models: generate-model-cfile
Expand Down
3 changes: 2 additions & 1 deletion training/model/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set -x
if [ -z "$HF_TOKEN" ]; then
echo "Error. Please set your \$HF_TOKEN in env. Required to pull mixtral."
exit 1
fi

huggingface-cli download --exclude "*.pt" --local-dir "/download/$(MODEL_REPO)" "$(MODEL_REPO)"
huggingface-cli download --exclude "*.pt" --local-dir "/download/${MODEL_REPO}" "${MODEL_REPO}"

0 comments on commit 85da91d

Please sign in to comment.