Revert "build.go: introduce a friendlier way to build Ollama (#3548)" (#3564)

This commit is contained in:
Blake Mizerany
2024-04-09 15:57:45 -07:00
committed by GitHub
parent fccf3eecaa
commit 1524f323a3
11 changed files with 61 additions and 251 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# This script is intended to run inside the `go run build.go` script, which
# sets the working directory to the correct location: ./llm/generate/.
# This script is intended to run inside the go generate
# working directory must be ./llm/generate/
# TODO - add hardening to detect missing tools (cmake, etc.)
@@ -89,10 +89,10 @@ case "${GOARCH}" in
;;
*)
echo "GOARCH must be set"
echo "this script is meant to be run from within 'go run build.go'"
echo "this script is meant to be run from within go generate"
exit 1
;;
esac
cleanup
echo "code generation completed. LLM runners: $(cd ${BUILD_DIR}/..; echo *)"
echo "go generate completed. LLM runners: $(cd ${BUILD_DIR}/..; echo *)"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# This script is intended to run with the `go run build.go` script, which
# sets the working directory to the correct location: ./llm/generate/.
# This script is intended to run inside the go generate
# working directory must be llm/generate/
# First we build one or more CPU based LLM libraries
#
@@ -237,4 +237,4 @@ if [ -d "${ROCM_PATH}" ]; then
fi
cleanup
echo "code generation completed. LLM runners: $(cd ${BUILD_DIR}/..; echo *)"
echo "go generate completed. LLM runners: $(cd ${BUILD_DIR}/..; echo *)"

View File

@@ -288,4 +288,4 @@ if ($null -ne $env:HIP_PATH) {
cleanup
write-host "`ncode generation completed. LLM runners: $(get-childitem -path ${script:SRC_DIR}\llm\build\windows\${script:ARCH})"
write-host "`ngo generate completed. LLM runners: $(get-childitem -path ${script:SRC_DIR}\llm\build\windows\${script:ARCH})"

View File

@@ -0,0 +1,3 @@
package generate
//go:generate bash ./gen_darwin.sh

View File

@@ -0,0 +1,3 @@
package generate
//go:generate bash ./gen_linux.sh

View File

@@ -0,0 +1,3 @@
package generate
//go:generate powershell -ExecutionPolicy Bypass -File ./gen_windows.ps1