-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-bake.hcl
73 lines (60 loc) · 1.42 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
# docker-bake.hcl for stable-diffusion-webui
group "default" {
targets = ["neurosis"]
}
variable "IMAGE_REGISTRY" {
default = "ghcr.io"
}
variable "IMAGE_NAMESPACE" {
default = "neggles/neurosis"
}
variable "BASE_NAMESPACE" {
default = "ghcr.io/neggles/tensorpods"
}
variable "BASE_NAME" {
default = "base"
}
variable "CUDA_VERSION" {
default = "cu121"
}
variable "TORCH_VERSION" {
default = "torch210"
}
variable "XFORMERS_VERSION" {
default = "xformers>=0.0.22"
}
variable "BNB_VERSION" {
default = "bitsandbytes>=0.41.1"
}
variable "TORCH_CUDA_ARCH_LIST" {
default = "7.0;7.5;8.0;8.6;8.9;9.0+PTX"
}
# docker-metadata-action will populate this in GitHub Actions
target "docker-metadata-action" {}
# Shared amongst all containers
target "common" {
context = "."
dockerfile = "docker/Dockerfile"
args = {
BASE_IMAGE = "${BASE_NAMESPACE}/${BASE_NAME}:${CUDA_VERSION}-${TORCH_VERSION}"
TORCH_CUDA_ARCH_LIST = TORCH_CUDA_ARCH_LIST
}
platforms = ["linux/amd64"]
}
# Base trainer image
target "neurosis" {
inherits = ["common", "docker-metadata-action"]
target = "neurosis"
args = {
XFORMERS_VERSION = XFORMERS_VERSION
BNB_VERSION = BNB_VERSION
}
}
# Base trainer image
target "coreweave" {
inherits = ["common", "docker-metadata-action", "neurosis"]
target = "neurosis"
args = {
BASE_IMAGE = "${BASE_NAMESPACE}/coreweave:${CUDA_VERSION}-${TORCH_VERSION}"
}
}