ollama/scripts/build_docker.sh

18 lines
454 B
Bash
Raw Normal View History

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\"'"
docker buildx build \
--load \
--platform=linux/arm64,linux/amd64 \
--build-arg=VERSION \
--build-arg=GOFLAGS \
2023-11-18 13:51:24 +00:00
--cache-from type=local,src=.cache \
--cache-to type=local,dest=.cache \
2023-09-26 17:38:32 +00:00
-f Dockerfile \
-t ollama \
.