forked from deephaven/deephaven-server-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.hcl
177 lines (150 loc) · 4.04 KB
/
server.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
group "default" {
targets = [
"server"
]
}
group "extra" {
targets = [
"server-all-ai",
"server-nltk",
"server-pytorch",
"server-sklearn",
"server-tensorflow"
]
}
# -------------------------------------
variable "REPO_PREFIX" {
default = "deephaven/"
}
variable "SERVER_PREFIX" {
default = "server"
}
variable "CACHE_PREFIX" {
default = "deephaven-server-docker-"
}
variable "DEEPHAVEN_SOURCES" {
// "released" means that the build will use the released sources - tar from GitHub and wheel from PyPi
// "custom" means that the builder will provide the tar and wheel files
default = "released"
}
variable "DEEPHAVEN_VERSION" {
default = "0.20.0"
}
variable "OPENJDK_VERSION" {
default = "17"
}
variable "PYTHON_VERSION" {
default = "3.10"
}
variable "UBUNTU_VERSION" {
default = "22.04"
}
variable "GRPC_HEALTH_PROBE_VERSION" {
default = "0.4.15"
}
variable "TAG" {
default = "latest"
}
variable "RELEASE" {
default = false
}
variable "MULTI_ARCH" {
default = false
}
variable "GITHUB_ACTIONS" {
default = false
}
// Due to our nightly builds, setting a build timestamp for org.opencontainers.image.created would
// cause a new image manifest to be created every night, which is something we don't want unless
// the base image has been updated.
// variable "BUILD_TIMESTAMP" {
// default = "${timestamp()}"
// }
# -------------------------------------
target "server" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server"
}
}
# -------------------------------------
target "server-all-ai" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}-all-ai:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}-all-ai:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server-all-ai"
}
}
target "server-nltk" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}-nltk:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}-nltk:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server-nltk"
}
}
target "server-pytorch" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}-pytorch:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}-pytorch:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server-pytorch"
}
}
target "server-sklearn" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}-sklearn:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}-sklearn:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server-sklearn"
}
}
target "server-tensorflow" {
inherits = [ "server-context" ]
tags = [
"${REPO_PREFIX}${SERVER_PREFIX}-tensorflow:${TAG}",
equal("latest", TAG) ? "${REPO_PREFIX}${SERVER_PREFIX}-tensorflow:${DEEPHAVEN_VERSION}" : ""
]
args = {
REQUIREMENTS_TYPE = "server-tensorflow"
}
}
# -------------------------------------
target "server-context" {
context = "contexts/server/"
args = {
DEEPHAVEN_VERSION = DEEPHAVEN_VERSION
OPENJDK_VERSION = OPENJDK_VERSION
PYTHON_VERSION = PYTHON_VERSION
UBUNTU_VERSION = UBUNTU_VERSION
GRPC_HEALTH_PROBE_VERSION = GRPC_HEALTH_PROBE_VERSION
DEEPHAVEN_SOURCES = DEEPHAVEN_SOURCES
}
cache-from = [
GITHUB_ACTIONS ? "type=gha,scope=${CACHE_PREFIX}" : ""
]
cache-to = [
GITHUB_ACTIONS && RELEASE ? "type=gha,mode=max,scope=${CACHE_PREFIX}" : ""
]
platforms = [
MULTI_ARCH || RELEASE ? "linux/amd64" : "",
MULTI_ARCH || RELEASE ? "linux/arm64" : "",
]
output = [
RELEASE ? "type=registry" : ""
]
}
# -------------------------------------