diff --git a/training/model/Containerfile b/training/model/Containerfile index 776fdbb3..f6e317ae 100644 --- a/training/model/Containerfile +++ b/training/model/Containerfile @@ -1,8 +1,8 @@ FROM quay.io/centos-bootc/centos-bootc:stream9 -ARG MODEL_REPO=https://huggingface.co/ibm/granite-7b-base -ARG MODEL_PATH=/usr/share/ai-model +ARG MODEL_REPO='' +ARG MODEL_PATH='' -RUN dnf install -y git-lfs -RUN mkdir -p "${MODEL_PATH}" -RUN git clone --progress --verbose "${MODEL_REPO}" "${MODEL_PATH}" +RUN dnf install -y python3-pip && python -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 diff --git a/training/model/Makefile b/training/model/Makefile index c0b2d3b6..db8b9e01 100644 --- a/training/model/Makefile +++ b/training/model/Makefile @@ -8,8 +8,8 @@ IMAGE_TAG ?= latest CONTAINER_TOOL ?= podman CONTAINER_TOOL_EXTRA_ARGS ?= -MODEL_REPO ?= -MODEL_PATH ?= +MODEL_REPO ?= ibm/granite-7b-base +MODEL_PATH ?= /usr/share/ai-model .PHONY: image image: