Skip to content

Commit

Permalink
Intermediary model container
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 6571043 commit 04a7d08
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions training/model/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +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

RUN dnf install -y git-lfs
RUN mkdir -p "${MODEL_PATH}"
RUN git clone --progress --verbose "${MODEL_REPO}" "${MODEL_PATH}"
22 changes: 22 additions & 0 deletions training/model/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ?=

REGISTRY ?= quay.io
REGISTRY_ORG ?= ai-lab
IMAGE_NAME ?= granite-model
IMAGE_TAG ?= latest

CONTAINER_TOOL ?= podman
CONTAINER_TOOL_EXTRA_ARGS ?=

MODEL_REPO ?=
MODEL_PATH ?=

.PHONY: image
image:
"${CONTAINER_TOOL}" build \
--file Containerfile \
--tag "${REGISTRY}/${REGISTRY_ORG}/${IMAGE_NAME}:${IMAGE_TAG}" \
$(FROM:%=--build-arg BASEIMAGE=%) \
$(MODEL_REPO:%=--build-arg MODEL_REPO=%) \
$(MODEL_PATH:%=--build-arg MODEL_PATH=%) \
${CONTAINER_TOOL_EXTRA_ARGS}

0 comments on commit 04a7d08

Please sign in to comment.