Skip to content

Commit

Permalink
Merge pull request #255 from rhatdan/bootc
Browse files Browse the repository at this point in the history
Improve model_server Makefile.
  • Loading branch information
sallyom authored Apr 12, 2024
2 parents 3734eae + 7768d4d commit e02d153
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions models/Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf
#https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
#https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF/resolve/main/codellama-7b-instruct.Q4_K_M.gguf
#https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
# Suggested alternative open AI Models
# https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf
# https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf (Default)
# https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF/resolve/main/codellama-7b-instruct.Q4_K_M.gguf
# https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
# podman build --build-arg MODEL_URL=https://... -t quay.io/yourimage .
#
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13

# Can be substituted using the --build-arg defined above
ARG MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf

# By default the Model Server container image uses the AI Model stored in the model/model.file file.
WORKDIR /model
ADD $MODEL_URL /model/model.file
4 changes: 2 additions & 2 deletions models/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MODEL ?= MODEL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
MODEL ?= https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
IMAGE ?= quay.io/ai-lab/llama:latest

.PHONY: build
build:
podman build --build-arg ${MODEL} -f Containerfile -t ${IMAGE} .
podman build $${MODEL:+--build-arg MODEL=$${MODEL}} -f Containerfile -t ${IMAGE} .

0 comments on commit e02d153

Please sign in to comment.