push_docker.sh 447 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#!/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 \
    --push \
    --platform=linux/arm64,linux/amd64 \
    --build-arg=VERSION \
    --build-arg=GOFLAGS \
Jeffrey Morgan's avatar
Jeffrey Morgan committed
13
    --cache-from type=local,src=.cache \
14
15
16
    -f Dockerfile \
    -t ollama/ollama -t ollama/ollama:$VERSION \
    .