Skip to content

Commit

Permalink
better download script
Browse files Browse the repository at this point in the history
Signed-off-by: Costin Gamenț <[email protected]>
  • Loading branch information
kwozyman committed Apr 30, 2024
1 parent c3197ce commit 4490863
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions training/model/Containerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM quay.io/centos-bootc/centos-bootc:stream9
FROM registry.access.redhat.com/ubi9/ubi

ARG MODEL_REPO=''
ARG MODEL_NAME=''
ARG MODEL_PATH=''

RUN dnf install -y python3-pip && python -m pip install huggingface_hub
RUN dnf install -y python3-pip && python3 -m pip install huggingface_hub
RUN mkdir -p "${MODEL_PATH}" \
&& echo from huggingface_hub import snapshot_download\;snapshot_download\(repo_id=\'${MODEL_REPO}\', local_dir=\'${MODEL_PATH}\', local_dir_use_symlinks=False\) | python
&& echo from huggingface_hub import snapshot_download > /root/hf_download \
&& echo snapshot_download\(repo_id=\'${MODEL_REPO}\', local_dir=\'${MODEL_PATH}\', local_dir_use_symlinks=False\) >> /root/hf_download \
&& python3 /root/hf_download

0 comments on commit 4490863

Please sign in to comment.