cache docker builds

This commit is contained in:
Jeffrey Morgan 2023-11-18 08:51:24 -05:00
parent 42e43736a4
commit 85e4441c6a
4 changed files with 5 additions and 0 deletions

View file

@ -6,3 +6,4 @@ scripts
llm/llama.cpp/ggml llm/llama.cpp/ggml
llm/llama.cpp/gguf llm/llama.cpp/gguf
.env .env
.cache

1
.gitignore vendored
View file

@ -6,3 +6,4 @@
dist dist
ollama ollama
ggml-metal.metal ggml-metal.metal
.cache

View file

@ -10,6 +10,8 @@ docker buildx build \
--platform=linux/arm64,linux/amd64 \ --platform=linux/arm64,linux/amd64 \
--build-arg=VERSION \ --build-arg=VERSION \
--build-arg=GOFLAGS \ --build-arg=GOFLAGS \
--cache-from type=local,src=.cache \
--cache-to type=local,dest=.cache \
-f Dockerfile \ -f Dockerfile \
-t ollama \ -t ollama \
. .

View file

@ -10,6 +10,7 @@ docker buildx build \
--platform=linux/arm64,linux/amd64 \ --platform=linux/arm64,linux/amd64 \
--build-arg=VERSION \ --build-arg=VERSION \
--build-arg=GOFLAGS \ --build-arg=GOFLAGS \
--cache-from type=local,src=.cache \
-f Dockerfile \ -f Dockerfile \
-t ollama/ollama -t ollama/ollama:$VERSION \ -t ollama/ollama -t ollama/ollama:$VERSION \
. .