From 471fc9edc3ca05eb839cc9ce60d92f9a5afb3a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20P=C3=A9rez?= Date: Tue, 23 Jul 2024 14:14:50 +0100 Subject: [PATCH] Trying to save the model --- .gitignore | 1 + Makefile | 18 ++++++++++++++++-- packaging/rpm/Makefile | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d787d43..6c6c647 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # SOURCES and pkgs SOURCES pkgs +packaging resources/model/* \ No newline at end of file diff --git a/Makefile b/Makefile index 8bb2188..f616642 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,23 @@ +MKL_RED?= \033[031m +MKL_GREEN?= \033[032m +MKL_YELLOW?= \033[033m +MKL_BLUE?= \033[034m +MKL_CLR_RESET?= \033[0m + all: rpm rpm: - curl -L https://huggingface.co/Mozilla/llava-v1.5-7b-llamafile/resolve/main/llava-v1.5-7b-q4.llamafile?download=true -o resources/model/llava-v1.5-7b-q4.llamafile + mkdir -p resources/model + @printf "$(MKL_YELLOW)Downloading the model $(BIN)$(MKL_CLR_RESET)\n" + # curl -L https://huggingface.co/Mozilla/llava-v1.5-7b-llamafile/resolve/main/llava-v1.5-7b-q4.llamafile?download=true -o resources/model/llava-v1.5-7b-q4.llamafile + @if [ ! -f resources/model/llava-v1.5-7b-q4.llamafile ]; then printf "$(MKL_RED)Model dont downloaded$(MKL_CLR_RESET)\n"; exit 1; fi + @printf "$(MKL_GREEN)Model downloaded successfully$(MKL_CLR_RESET)\n" $(MAKE) -C packaging/rpm rpmtest: - $(MAKE) LATEST=`git stash create` -C packaging/rpm \ No newline at end of file + $(MAKE) LATEST=`git stash create` -C packaging/rpm + +clean: + rm resources/model/* + rmdir resources/model \ No newline at end of file diff --git a/packaging/rpm/Makefile b/packaging/rpm/Makefile index 73e1392..e8fe327 100644 --- a/packaging/rpm/Makefile +++ b/packaging/rpm/Makefile @@ -15,6 +15,7 @@ SOURCES: mkdir -p SOURCES archive: SOURCES + cp ../../resources/model/* SOURCES/ cd ../../ && \ git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \ -o packaging/rpm/SOURCES/$(PACKAGE_NAME)-$(VERSION).tar.gz HEAD