-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-bake.hcl
109 lines (89 loc) · 2.76 KB
/
docker-bake.hcl
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
variable "DOCKER_REGISTRY" {
default = "ghcr.io"
}
variable "DOCKER_ORG" {
default = "darpa-askem"
}
variable "VERSION" {
default = "local"
}
# ---------------------------------
function "tag" {
params = [image_name, prefix, suffix]
result = [ "${DOCKER_REGISTRY}/${DOCKER_ORG}/${image_name}:${check_prefix(prefix)}${VERSION}${check_suffix(suffix)}" ]
}
function "check_prefix" {
params = [tag]
result = notequal("",tag) ? "${tag}-": ""
}
function "check_suffix" {
params = [tag]
result = notequal("",tag) ? "-${tag}": ""
}
# ---------------------------------
group "prod" {
targets = ["hmi-client", "hmi-server", "gollm-taskrunner", "mira-taskrunner", "funman-taskrunner", "text-extraction-taskrunner", "equation-extraction-taskrunner"]
}
group "default" {
targets = ["hmi-client-base", "hmi-server-base", "gollm-taskrunner-base", "mira-taskrunner-base", "funman-taskrunner-base", "text-extraction-taskrunner-base", "equation-extraction-taskrunner-base"]
}
# ---------------------------------
target "_platforms" {
platforms = ["linux/amd64", "linux/arm64"]
}
target "hmi-client-base" {
context = "packages/client/hmi-client/docker"
tags = tag("hmi-client", "", "")
dockerfile = "Dockerfile"
}
target "hmi-client" {
inherits = ["_platforms", "hmi-client-base"]
}
target "hmi-server-base" {
context = "." # root of the repo
dockerfile = "./packages/server/docker/Dockerfile"
tags = tag("hmi-server", "", "")
}
target "hmi-server" {
inherits = ["_platforms", "hmi-server-base"]
}
target "gollm-taskrunner-base" {
context = "." # root of the repo
dockerfile = "./packages/gollm/Dockerfile"
tags = tag("gollm-taskrunner", "", "")
}
target "gollm-taskrunner" {
inherits = ["_platforms", "gollm-taskrunner-base"]
}
target "mira-taskrunner-base" {
context = "." # root of the repo
dockerfile = "./packages/mira/Dockerfile"
tags = tag("mira-taskrunner", "", "")
}
target "mira-taskrunner" {
inherits = ["_platforms", "mira-taskrunner-base"]
}
target "funman-taskrunner-base" {
context = "." # root of the repo
dockerfile = "./packages/funman/Dockerfile"
tags = tag("funman-taskrunner", "", "")
}
target "funman-taskrunner" {
inherits = ["_platforms", "funman-taskrunner-base"]
}
target "equation-extraction-taskrunner-base" {
context = "." # root of the repo
dockerfile = "./packages/equation_extraction/Dockerfile"
tags = tag("equation-extraction-taskrunner", "", "")
}
target "equation-extraction-taskrunner" {
inherits = ["_platforms", "equation-extraction-taskrunner-base"]
}
target "text-extraction-taskrunner-base" {
context = "." # root of the repo
dockerfile = "./packages/text_extraction/Dockerfile"
tags = tag("text-extraction-taskrunner", "", "")
}
target "text-extraction-taskrunner" {
inherits = ["_platforms", "text-extraction-taskrunner-base"]
}