-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservices.toml.example
More file actions
105 lines (86 loc) · 1.81 KB
/
services.toml.example
File metadata and controls
105 lines (86 loc) · 1.81 KB
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
# -- Container workload --
[[service]]
name = "api"
image = "ghcr.io/myorg/api:latest"
replicas = 3
port = 8080
health = "/healthz"
domain = "api.example.com"
[service.env]
DATABASE_URL = "${secrets.db_url}"
[service.resources]
memory = "256Mi"
cpu = 0.5
[service.deploy]
strategy = "rolling"
max_unavailable = 1
# -- GPU workload (LLM inference) --
[[service]]
name = "llm-inference"
image = "vllm/vllm-openai:latest"
replicas = 1
port = 8000
domain = "llm.example.com"
health = "/health"
[service.env]
MODEL = "meta-llama/Llama-3.1-8B-Instruct"
TENSOR_PARALLEL_SIZE = "1"
[service.resources]
memory = "32Gi"
cpu = 8.0
[service.resources.gpu]
count = 1
vendor = "nvidia"
vram_min = 24000
# -- GPU workload (image generation) --
[[service]]
name = "comfyui"
image = "ghcr.io/myorg/comfyui:latest"
replicas = 1
port = 8188
[service.resources]
memory = "16Gi"
cpu = 4.0
[service.resources.gpu]
count = 1
vendor = "nvidia"
model = "RTX4090"
[service.volume]
path = "/workspace/models"
size = "100Gi"
# -- Wasm workload (HTTP trigger) --
[[service]]
name = "edge-functions"
runtime = "wasm"
module = "oci://ghcr.io/myorg/edge:latest"
triggers = ["http:/api/edge/*"]
replicas = "auto"
[service.env]
API_KEY = "${secrets.edge_key}"
# -- Database (pinned to node with volume) --
[[service]]
name = "postgres"
image = "postgres:16"
port = 5432
[service.volume]
path = "/var/lib/postgresql/data"
size = "10Gi"
[service.placement]
labels = { zone = "eu-1" }
# -- Build from source (Dockerfile) --
[[service]]
name = "custom-api"
port = 3000
domain = "custom.example.com"
health = "/health"
[service.build]
repo = "git@github.com:myorg/custom-api.git"
branch = "main"
dockerfile = "Dockerfile"
context = "."
# -- Wasm cron job --
[[service]]
name = "daily-report"
runtime = "wasm"
module = "./jobs/report.wasm"
triggers = ["cron:0 9 * * *"]