Skip to content

Commit 68e340a

Browse files
committed
Deploy docling-serve service in the container for podman and kubernetes
Signed-off-by: Anil Vishnoi <[email protected]>
1 parent 9a1f9c7 commit 68e340a

File tree

12 files changed

+1468
-2102
lines changed

12 files changed

+1468
-2102
lines changed

Makefiles/containers-base/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ endif
2828
################## BUILD SOURCE CONTAINERS ##################
2929

3030
ui-image: validate-container-engine src/Containerfile ## Build container image for the InstructLab UI
31-
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
32-
$(CMD_PREFIX) $(CONTAINER_ENGINE) build --platform linux/$(TARGET_IMAGE_ARCH) -f src/Containerfile -t quay.io/instructlab-ui/ui:$(TAG) .
31+
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[$(CONTAINER_ENGINE)]"
32+
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f src/Containerfile -t quay.io/instructlab-ui/ui:$(TAG) .
3333
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) quay.io/instructlab-ui/ui:main
34+
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) ghcr.io/instructlab/ui/ui:main
3435

3536
ps-image: validate-container-engine pathservice/Containerfile ## Build container image for the InstructLab PathService
36-
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
37-
$(CMD_PREFIX) $(CONTAINER_ENGINE) build --platform linux/$(TARGET_IMAGE_ARCH) -f pathservice/Containerfile -t quay.io/instructlab-ui/pathservice:$(TAG) .
37+
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[$(CONTAINER_ENGINE)]"
38+
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f pathservice/Containerfile -t quay.io/instructlab-ui/pathservice:$(TAG) .
3839
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) quay.io/instructlab-ui/pathservice:main
40+
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) ghcr.io/instructlab/ui/pathservice:main
3941

4042
healthcheck-sidecar-image: validate-container-engine healthcheck-sidecar/Containerfile ## Build container image for the InstructLab Healthcheck-Sidecar
41-
$(ECHO_PREFIX) printf " %-12s healthcheck-sidecar/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
43+
$(ECHO_PREFIX) printf " %-12s healthcheck-sidecar/Containerfile\n" "[$(CONTAINER_ENGINE)]"
4244
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f healthcheck-sidecar/Containerfile -t quay.io/instructlab-ui/healthcheck-sidecar:$(TAG) healthcheck-sidecar
4345
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/healthcheck-sidecar:$(TAG) quay.io/instructlab-ui/healthcheck-sidecar:main
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: doclingserve
5+
spec:
6+
replicas: 1
7+
strategy:
8+
type: RollingUpdate
9+
template:
10+
spec:
11+
containers:
12+
- name: doclingserve
13+
image: ghcr.io/ds4sd/docling-serve-cpu:main
14+
imagePullPolicy: Always
15+
resources:
16+
requests:
17+
cpu: 100m
18+
memory: 200Mi
19+
ports:
20+
- name: http
21+
protocol: TCP
22+
containerPort: 5000
23+
restartPolicy: Always
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- deployment.yaml
5+
- service.yaml
6+
labels:
7+
- includeSelectors: true
8+
pairs:
9+
app.kubernetes.io/component: doclingserve
10+
app.kubernetes.io/instance: doclingserve
11+
app.kubernetes.io/name: doclingserve
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: doclingserve
5+
spec:
6+
clusterIP: None
7+
selector:
8+
app.kubernetes.io/component: doclingserve
9+
app.kubernetes.io/instance: doclingserve
10+
app.kubernetes.io/name: doclingserve
11+
ports:
12+
- port: 5000
13+
targetPort: 5000

deploy/k8s/base/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resources:
55
- namespace.yaml
66
- ui
77
- pathservice
8+
- doclingserve
89
labels:
910
- includeSelectors: true
1011
pairs:

deploy/podman/github/instructlab-ui.yaml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ spec:
1616
- name: pathservice
1717
image: ghcr.io/instructlab/ui/pathservice:main
1818
resources:
19-
limits:
20-
cpu: "100m"
21-
memory: "200Mi"
2219
requests:
2320
cpu: "100m"
2421
memory: "200Mi"
@@ -29,6 +26,32 @@ spec:
2926
---
3027
apiVersion: apps/v1
3128
kind: Deployment
29+
metadata:
30+
name: doclingserve
31+
spec:
32+
replicas: 1
33+
selector:
34+
matchLabels:
35+
app: doclingserve
36+
template:
37+
metadata:
38+
labels:
39+
app: doclingserve
40+
spec:
41+
containers:
42+
- name: doclingserve
43+
image: ghcr.io/ds4sd/docling-serve-cpu:main
44+
resources:
45+
requests:
46+
cpu: "100m"
47+
memory: "200Mi"
48+
ports:
49+
- containerPort: 5000
50+
hostPort: 5000
51+
imagePullPolicy: Always
52+
---
53+
apiVersion: apps/v1
54+
kind: Deployment
3255
metadata:
3356
name: ui
3457
spec:
@@ -45,9 +68,6 @@ spec:
4568
- name: ui
4669
image: ghcr.io/instructlab/ui/ui:main
4770
resources:
48-
limits:
49-
cpu: "100m"
50-
memory: "200Mi"
5171
requests:
5272
cpu: "100m"
5373
memory: "200Mi"

deploy/podman/native/instructlab-ui.yaml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ spec:
1616
- name: pathservice
1717
image: ghcr.io/instructlab/ui/pathservice:main
1818
resources:
19-
limits:
20-
cpu: "500m"
21-
memory: "500Mi"
2219
requests:
2320
cpu: "1000m"
2421
memory: "1000Mi"
@@ -29,6 +26,32 @@ spec:
2926
---
3027
apiVersion: apps/v1
3128
kind: Deployment
29+
metadata:
30+
name: doclingserve
31+
spec:
32+
replicas: 1
33+
selector:
34+
matchLabels:
35+
app: doclingserve
36+
template:
37+
metadata:
38+
labels:
39+
app: doclingserve
40+
spec:
41+
containers:
42+
- name: doclingserve
43+
image: ghcr.io/ds4sd/docling-serve-cpu:main
44+
resources:
45+
requests:
46+
cpu: "1000m"
47+
memory: "2000Mi"
48+
ports:
49+
- containerPort: 5000
50+
hostPort: 5000
51+
imagePullPolicy: Always
52+
---
53+
apiVersion: apps/v1
54+
kind: Deployment
3255
metadata:
3356
name: ui
3457
spec:

0 commit comments

Comments
 (0)