2023-07-26 12:50:41 +02:00
|
|
|
variable "ARCH" {
|
|
|
|
default = "amd64"
|
|
|
|
}
|
|
|
|
variable "BASE_IMAGE" {
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
variable "SLIM_BASE" {
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
variable "TRT_BASE" {
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
|
|
|
|
target "_build_args" {
|
|
|
|
args = {
|
|
|
|
BASE_IMAGE = BASE_IMAGE,
|
|
|
|
SLIM_BASE = SLIM_BASE,
|
|
|
|
TRT_BASE = TRT_BASE
|
|
|
|
}
|
|
|
|
platforms = ["linux/${ARCH}"]
|
|
|
|
}
|
|
|
|
|
|
|
|
target wget {
|
|
|
|
dockerfile = "docker/main/Dockerfile"
|
|
|
|
target = "wget"
|
|
|
|
inherits = ["_build_args"]
|
|
|
|
}
|
|
|
|
|
2023-07-23 23:45:29 +02:00
|
|
|
target deps {
|
|
|
|
dockerfile = "docker/main/Dockerfile"
|
|
|
|
target = "deps"
|
2023-07-26 12:50:41 +02:00
|
|
|
inherits = ["_build_args"]
|
2023-07-23 23:45:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
target rootfs {
|
|
|
|
dockerfile = "docker/main/Dockerfile"
|
|
|
|
target = "rootfs"
|
2023-07-26 12:50:41 +02:00
|
|
|
inherits = ["_build_args"]
|
2023-07-23 23:45:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
target wheels {
|
|
|
|
dockerfile = "docker/main/Dockerfile"
|
|
|
|
target = "wheels"
|
2023-07-26 12:50:41 +02:00
|
|
|
inherits = ["_build_args"]
|
2023-07-23 23:45:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
target devcontainer {
|
|
|
|
dockerfile = "docker/main/Dockerfile"
|
|
|
|
platforms = ["linux/amd64"]
|
|
|
|
target = "devcontainer"
|
|
|
|
}
|
|
|
|
|
2023-07-26 12:50:41 +02:00
|
|
|
target "trt-deps" {
|
|
|
|
dockerfile = "docker/tensorrt/Dockerfile.base"
|
2023-07-23 23:45:29 +02:00
|
|
|
context = "."
|
|
|
|
contexts = {
|
|
|
|
deps = "target:deps",
|
|
|
|
}
|
2023-07-26 12:50:41 +02:00
|
|
|
inherits = ["_build_args"]
|
2023-07-23 23:45:29 +02:00
|
|
|
}
|
|
|
|
|
2023-07-26 12:50:41 +02:00
|
|
|
target "tensorrt-base" {
|
|
|
|
dockerfile = "docker/tensorrt/Dockerfile.base"
|
2023-07-23 23:45:29 +02:00
|
|
|
context = "."
|
|
|
|
contexts = {
|
|
|
|
deps = "target:deps",
|
2023-07-26 12:50:41 +02:00
|
|
|
}
|
|
|
|
inherits = ["_build_args"]
|
|
|
|
}
|
|
|
|
|
|
|
|
target "tensorrt" {
|
|
|
|
dockerfile = "docker/tensorrt/Dockerfile.${ARCH}"
|
|
|
|
context = "."
|
|
|
|
contexts = {
|
|
|
|
wget = "target:wget",
|
|
|
|
tensorrt-base = "target:tensorrt-base",
|
2023-07-23 23:45:29 +02:00
|
|
|
rootfs = "target:rootfs"
|
|
|
|
wheels = "target:wheels"
|
2023-07-26 12:50:41 +02:00
|
|
|
}
|
|
|
|
target = "frigate-tensorrt"
|
|
|
|
inherits = ["_build_args"]
|
|
|
|
}
|
|
|
|
|
|
|
|
target "devcontainer-trt" {
|
|
|
|
dockerfile = "docker/tensorrt/Dockerfile.amd64"
|
|
|
|
context = "."
|
|
|
|
contexts = {
|
|
|
|
wheels = "target:wheels",
|
|
|
|
trt-deps = "target:trt-deps",
|
2023-07-23 23:45:29 +02:00
|
|
|
devcontainer = "target:devcontainer"
|
|
|
|
}
|
|
|
|
platforms = ["linux/amd64"]
|
|
|
|
target = "devcontainer-trt"
|
2023-07-26 12:50:41 +02:00
|
|
|
}
|