-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-bake.hcl
75 lines (62 loc) · 1.11 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
# docker-bake.hcl
variable "VERSION" {
}
variable "ORGANIZATION" {
default = "cnts4sci"
}
variable "REGISTRY" {
default = "ghcr.io"
}
variable "PLATFORMS" {
default = ["linux/amd64"]
}
variable "SYSTEM_BASE_IMAGE" {
default = "ubuntu:20.04"
}
variable "TARGETS" {
default = ["bm", "bm-openmpi", "bm-lapack"]
}
# TAGS for softwares
variable "OPENMPI_VERSION" {
}
variable "LAPACK_VERSION" {
}
function "tags" {
params = [image]
result = [
"${REGISTRY}/${ORGANIZATION}/${image}"
]
}
group "default" {
targets = "${TARGETS}"
}
target "bm" {
tags = tags("bm")
context = "bm"
contexts = {
base-image = "docker-image://${SYSTEM_BASE_IMAGE}"
}
platforms = "${PLATFORMS}"
}
target "bm-openmpi" {
tags = tags("bm-openmpi")
context = "bm-openmpi"
contexts = {
base-image = "target:bm"
}
platforms = "${PLATFORMS}"
args = {
OPENMPI_VERSION = "${OPENMPI_VERSION}"
}
}
target "bm-lapack" {
tags = tags("bm-lapack")
context = "bm-lapack"
contexts = {
base-image = "target:bm"
}
platforms = "${PLATFORMS}"
args = {
LAPACK_VERSION = "${LAPACK_VERSION}"
}
}