Skip to content

Commit 5e3cf52

Browse files
authored
Merge pull request #28 from docker/multiarch
Make the `docker-build` target create a multiarch image
2 parents f30a4ce + 19a1079 commit 5e3cf52

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ APP_NAME := model-runner
33
GO_VERSION := 1.23.7
44
LLAMA_SERVER_VERSION := v0.0.4-cpu
55
TARGET_OS := linux
6-
TARGET_ARCH := $(shell uname -m 2>/dev/null | sed 's/aarch64/arm64/g' || echo "amd64")
76
ACCEL := cpu
8-
DOCKER_IMAGE := go-model-runner:latest
9-
LLAMA_BINARY := /com.docker.llama-server.native.$(TARGET_OS).$(ACCEL).$(TARGET_ARCH)
7+
DOCKER_IMAGE := docker/model-runner:latest
108
PORT := 8080
119
MODELS_PATH := $(shell pwd)/models
1210

@@ -36,9 +34,9 @@ test:
3634

3735
# Build Docker image
3836
docker-build:
39-
docker build \
37+
docker buildx build \
38+
--platform linux/amd64,linux/arm64 \
4039
--build-arg LLAMA_SERVER_VERSION=$(LLAMA_SERVER_VERSION) \
41-
--build-arg LLAMA_BINARY_PATH=$(LLAMA_BINARY) \
4240
-t $(DOCKER_IMAGE) .
4341

4442
# Run in Docker container with TCP port access and mounted model storage

0 commit comments

Comments
 (0)