mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
Make CPU builds parallel and customizable AMD GPUs
The linux build now support parallel CPU builds to speed things up. This also exposes AMD GPU targets as an optional setting for advaced users who want to alter our default set.
This commit is contained in:
parent
fa8c990e58
commit
df54c723ae
4 changed files with 68 additions and 44 deletions
|
@ -6,6 +6,7 @@ export VERSION=${VERSION:-0.0.0}
|
|||
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version=$VERSION\" \"-X=github.com/jmorganca/ollama/server.mode=release\"'"
|
||||
|
||||
BUILD_ARCH=${BUILD_ARCH:-"amd64 arm64"}
|
||||
export AMDGPU_TARGETS=${AMDGPU_TARGETS:=""}
|
||||
mkdir -p dist
|
||||
|
||||
for TARGETARCH in ${BUILD_ARCH}; do
|
||||
|
@ -14,6 +15,7 @@ for TARGETARCH in ${BUILD_ARCH}; do
|
|||
--build-arg=GOFLAGS \
|
||||
--build-arg=CGO_CFLAGS \
|
||||
--build-arg=OLLAMA_CUSTOM_CPU_DEFS \
|
||||
--build-arg=AMDGPU_TARGETS \
|
||||
--target build-$TARGETARCH \
|
||||
-f Dockerfile \
|
||||
-t builder:$TARGETARCH \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue