Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b8008102
Commit
b8008102
authored
Dec 22, 2023
by
Jeffrey Morgan
Browse files
cache docker builds in `build_linux.sh`
parent
79045739
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
scripts/build_linux.sh
scripts/build_linux.sh
+1
-1
No files found.
scripts/build_linux.sh
View file @
b8008102
...
@@ -8,7 +8,7 @@ export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version
...
@@ -8,7 +8,7 @@ export GOFLAGS="'-ldflags=-w -s \"-X=github.com/jmorganca/ollama/version.Version
mkdir
-p
dist
mkdir
-p
dist
for
TARGETARCH
in
amd64 arm64
;
do
for
TARGETARCH
in
amd64 arm64
;
do
docker buildx build
--load
--platform
=
linux/
$TARGETARCH
--build-arg
=
VERSION
--build-arg
=
GOFLAGS
--build-arg
=
CGO_CFLAGS
-f
Dockerfile.build
-t
builder:
$TARGETARCH
.
docker buildx build
--load
--platform
=
linux/
$TARGETARCH
--build-arg
=
VERSION
--build-arg
=
GOFLAGS
--build-arg
=
CGO_CFLAGS
--cache-from
type
=
local
,src
=
.cache
--cache-to
type
=
local
,dest
=
.cache
-f
Dockerfile.build
-t
builder:
$TARGETARCH
.
docker create
--platform
linux/
$TARGETARCH
--name
builder-
$TARGETARCH
builder:
$TARGETARCH
docker create
--platform
linux/
$TARGETARCH
--name
builder-
$TARGETARCH
builder:
$TARGETARCH
docker
cp
builder-
$TARGETARCH
:/go/src/github.com/jmorganca/ollama/ollama ./dist/ollama-linux-
$TARGETARCH
docker
cp
builder-
$TARGETARCH
:/go/src/github.com/jmorganca/ollama/ollama ./dist/ollama-linux-
$TARGETARCH
docker
rm
builder-
$TARGETARCH
docker
rm
builder-
$TARGETARCH
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment