ollama/scripts/build_linux.sh
Jeffrey Morgan f997e29e45
Add Dockerfile.build for building linux binaries (#558)
Add `Dockerfile.build` for building linux binaries

---------

Co-authored-by: Michael Yang <mxyng@pm.me>
2023-09-22 15:20:12 -04:00

12 lines
345 B
Bash
Executable file

#!/bin/bash
set -e
mkdir -p dist
for ARCH in arm64 amd64; do
docker buildx build --platform=linux/$ARCH -f Dockerfile.build . -t builder:$ARCH --load
docker create --platform linux/$ARCH --name builder builder:$ARCH
docker cp builder:/go/src/github.com/jmorganca/ollama/ollama ./dist/ollama-linux-$ARCH
docker rm builder
done