fix: copy metal file from build

This ties the metal file to the build and reduces the steps the user has
to take to run local-ai
This commit is contained in:
mudler 2023-06-10 23:19:28 +02:00
parent f20c12a1c0
commit 2717541938
2 changed files with 6 additions and 1 deletions

4
.gitignore vendored
View file

@ -27,4 +27,6 @@ release/
.idea
# Generated during build
backend-assets/
backend-assets/
/ggml-metal.metal

View file

@ -219,6 +219,9 @@ build: prepare ## Build the project
$(info ${GREEN}I BUILD_TYPE: ${YELLOW}$(BUILD_TYPE)${RESET})
$(info ${GREEN}I GO_TAGS: ${YELLOW}$(GO_TAGS)${RESET})
CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=${C_INCLUDE_PATH} LIBRARY_PATH=${LIBRARY_PATH} $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o $(BINARY_NAME) ./
ifeq ($(BUILD_TYPE),metal)
cp go-llama/build/bin/ggml-metal.metal .
endif
dist: build
mkdir -p release