-
Notifications
You must be signed in to change notification settings - Fork 630
/
Copy pathbake.hcl
57 lines (51 loc) · 1.2 KB
/
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
variable "ARCH" {
default = "x86_64"
}
variable "CUDA_VERSION" {
default = "122"
}
target "cuda_toolkit" {
dockerfile = "docker/Dockerfile.cuda${CUDA_VERSION}.${ARCH}.deps"
tags = [
"nvidia/dali:cuda${CUDA_VERSION}_${ARCH}.toolkit"
]
}
target "deps_ubuntu" {
args = {
FROM_IMAGE_NAME = "ubuntu:22.04"
}
dockerfile = "docker/Dockerfile.deps.ubuntu"
tags = [
"nvidia/dali:${ARCH}.deps"
]
}
target "deps_with_cuda" {
contexts = {
"nvidia/dali:${ARCH}.deps" = "target:deps_ubuntu",
"nvidia/dali:cuda${CUDA_VERSION}_${ARCH}.toolkit" = "target:cuda_toolkit"
}
args = {
FROM_IMAGE_NAME = "nvidia/dali:${ARCH}.deps",
CUDA_IMAGE = "nvidia/dali:cuda${CUDA_VERSION}_${ARCH}.toolkit"
}
dockerfile = "docker/Dockerfile.cuda.deps"
tags = [
"nvidia/dali:cu${CUDA_VERSION}_${ARCH}.deps"
]
}
target "builder_image" {
contexts = {
"nvidia/dali:cu${CUDA_VERSION}_${ARCH}.deps" = "target:deps_with_cuda"
}
args = {
DEPS_IMAGE_NAME = "nvidia/dali:cu${CUDA_VERSION}_${ARCH}.deps"
}
dockerfile = "docker/Dockerfile.ubuntu"
tags = [
"nvidia/dali:cu${CUDA_VERSION}_${ARCH}.build"
]
target = "builder"
}
group "default" {
targets = ["builder_image"]
}