75c44aa319
This adds ROCm support back as a discrete image.
25 lines
669 B
Bash
Executable file
25 lines
669 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")}
|
|
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version=$VERSION\" \"-X=github.com/jmorganca/ollama/server.mode=release\"'"
|
|
|
|
docker build \
|
|
--load \
|
|
--platform=linux/arm64,linux/amd64 \
|
|
--build-arg=VERSION \
|
|
--build-arg=GOFLAGS \
|
|
-f Dockerfile \
|
|
-t ollama/ollama:$VERSION \
|
|
.
|
|
|
|
docker build \
|
|
--load \
|
|
--platform=linux/amd64 \
|
|
--build-arg=VERSION \
|
|
--build-arg=GOFLAGS \
|
|
--target runtime-rocm \
|
|
-f Dockerfile \
|
|
-t ollama/ollama:$VERSION-rocm \
|
|
.
|