-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
128 lines (107 loc) · 3.78 KB
/
Copy pathdocker-bake.hcl
File metadata and controls
128 lines (107 loc) · 3.78 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
variable "REGISTRY" {
default = "ghcr.io/llm-d"
}
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/llm-d-batch-gateway"
}
# Common group to build all images
group "default" {
targets = ["apiserver", "processor", "gc"]
}
# 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"
]
}
# Garbage Collector target
target "gc" {
context = "."
dockerfile = "docker/Dockerfile.gc"
platforms = ["linux/amd64", "linux/arm64"]
tags = [
# Always tag with commit SHA if provided
notequal("", COMMIT_SHA) ? "${REGISTRY}/batch-gateway-gc:${COMMIT_SHA}" : "",
# Tag with version (could be 'latest', a release tag like 'v1.0.0', or 'dev')
"${REGISTRY}/batch-gateway-gc:${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 Garbage Collector"
"org.opencontainers.image.description" = "Garbage collector for expired batch jobs and files"
"org.opencontainers.image.vendor" = "llm-d"
}
# Enable layer caching
cache-from = [
"type=registry,ref=${REGISTRY}/batch-gateway-gc:buildcache"
]
cache-to = [
"type=registry,ref=${REGISTRY}/batch-gateway-gc:buildcache,mode=max"
]
}