2023-09-26 17:38:32 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
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\"'"
|
|
|
|
|
2024-01-03 00:32:54 +00:00
|
|
|
docker build \
|
2023-09-26 17:38:32 +00:00
|
|
|
--load \
|
|
|
|
--platform=linux/arm64,linux/amd64 \
|
|
|
|
--build-arg=VERSION \
|
|
|
|
--build-arg=GOFLAGS \
|
|
|
|
-f Dockerfile \
|
2023-11-22 19:32:09 +00:00
|
|
|
-t ollama/ollama:$VERSION \
|
2023-09-26 17:38:32 +00:00
|
|
|
.
|