llmshell/Makefile

38 lines
780 B
Makefile

.DEFAULT_GOAL :=
.PHONY: default
default: shell
.PHONY: models
models: \
models/mistral7b.gguf
out:
mkdir -p out
models/mistral7b.gguf: models/mistral7b.sha256
wget -nc -O $@ \
https://huggingface.co/TheBloke/MetaMath-Mistral-7B-GGUF/resolve/main/metamath-mistral-7b.Q5_K_M.gguf || :
sha256sum --check --status < $< || mv $@ $@.fail
touch $@
out/shell.digest: Containerfile | out
docker build --target shell -f Containerfile -q . > $@
.PHONY: shell
shell: out/shell.digest models
docker run -it -v ./models:/workdir/models $(shell cat $<)
.PHONY: reproduce
vm: out/shell.digest models
docker run -it -v ./models:/workdir/models $(shell cat $<) sh -c "\
llama-cpp --version
"
.PHONY: clean
clean:
rm -rf out
.PHONY: update
update:
python3 scripts/update.py