forked from llm-d/llm-d-batch-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
95 lines (79 loc) · 2.69 KB
/
Copy pathdocker-bake.hcl
File metadata and controls
95 lines (79 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
variable "REGISTRY" {
default = "ghcr.io/llm-d-incubation"
}
variable "TAG" {
default = "latest"
}
variable "COMMIT_SHA" {
default = ""
}
variable "BUILD_DATE" {
default = ""
}
variable "VERSION" {
default = "dev"
}
# Docker metadata for labels
variable "SOURCE_REPO" {
default = "https://github.com/llm-d-incubation/batch-gateway"
}
# Common group to build all images
group "default" {
targets = ["apiserver", "processor"]
}
# API Server target
target "apiserver" {
context = "."
dockerfile = "docker/Dockerfile.apiserver"
platforms = ["linux/amd64", "linux/arm64"]
tags = [
# Always tag with commit SHA if provided
notequal("", COMMIT_SHA) ? "${REGISTRY}/batch-gateway-apiserver:${COMMIT_SHA}" : "",
# Tag with version (could be 'latest', a release tag like 'v1.0.0', or 'dev')
"${REGISTRY}/batch-gateway-apiserver:${TAG}",
]
labels = {
"org.opencontainers.image.created" = "${BUILD_DATE}"
"org.opencontainers.image.source" = "${SOURCE_REPO}"
"org.opencontainers.image.version" = "${VERSION}"
"org.opencontainers.image.revision" = "${COMMIT_SHA}"
"org.opencontainers.image.title" = "Batch Gateway API Server"
"org.opencontainers.image.description" = "LLM-D implementation of OpenAI /v1/batch and /v1/file APIs"
"org.opencontainers.image.vendor" = "llm-d"
}
# Enable layer caching
cache-from = [
"type=registry,ref=${REGISTRY}/batch-gateway-apiserver:buildcache"
]
cache-to = [
"type=registry,ref=${REGISTRY}/batch-gateway-apiserver:buildcache,mode=max"
]
}
# Batch Processor target
target "processor" {
context = "."
dockerfile = "docker/Dockerfile.processor"
platforms = ["linux/amd64", "linux/arm64"]
tags = [
# Always tag with commit SHA if provided
notequal("", COMMIT_SHA) ? "${REGISTRY}/batch-gateway-processor:${COMMIT_SHA}" : "",
# Tag with version (could be 'latest', a release tag like 'v1.0.0', or 'dev')
"${REGISTRY}/batch-gateway-processor:${TAG}",
]
labels = {
"org.opencontainers.image.created" = "${BUILD_DATE}"
"org.opencontainers.image.source" = "${SOURCE_REPO}"
"org.opencontainers.image.version" = "${VERSION}"
"org.opencontainers.image.revision" = "${COMMIT_SHA}"
"org.opencontainers.image.title" = "Batch Gateway Processor"
"org.opencontainers.image.description" = "Background processor for LLM batch job execution"
"org.opencontainers.image.vendor" = "llm-d"
}
# Enable layer caching
cache-from = [
"type=registry,ref=${REGISTRY}/batch-gateway-processor:buildcache"
]
cache-to = [
"type=registry,ref=${REGISTRY}/batch-gateway-processor:buildcache,mode=max"
]
}