1
- # Deployment
1
+ # Deployment Examples
2
+
3
+ This document provides deployment examples for running the application in different environments.
4
+
5
+ Choose the deployment option that best fits your setup.
6
+
7
+ - ** [ Local GPU] ( #local-gpu ) ** : For deploying the application locally on a machine with a NVIDIA GPU (using Docker Compose).
8
+ - ** [ OpenShift] ( #openshift ) ** : For deploying the application on an OpenShift cluster, designed for cloud-native environments.
9
+
10
+ ---
11
+
12
+ ## Local GPU
13
+
14
+ ### Docker compose
15
+
16
+ Manifest example: [ compose-gpu.yaml] ( ./deploy-examples/compose-gpu.yaml )
17
+
18
+ This deployment has the following features:
19
+
20
+ - NVIDIA cuda enabled
21
+
22
+ Install the app with:
23
+
24
+ ``` sh
25
+ docker compose -f docs/deploy-examples/compose-gpu.yaml up -d
26
+ ```
27
+
28
+ For using the API:
29
+
30
+ ``` sh
31
+ # Make a test query
32
+ curl -X ' POST' \
33
+ " localhost:5001/v1alpha/convert/source/async" \
34
+ -H " accept: application/json" \
35
+ -H " Content-Type: application/json" \
36
+ -d ' {
37
+ "http_sources": [{"url": "https://arxiv.org/pdf/2501.17887"}]
38
+ }'
39
+ ```
40
+
41
+ <details >
42
+ <summary ><b >Requirements</b ></summary >
43
+
44
+ - debian/ubuntu/rhel/fedora/opensuse
45
+ - docker
46
+ - nvidia drivers >=550.54.14
47
+ - nvidia-container-toolkit
48
+
49
+ Docs:
50
+
51
+ - [ NVIDIA Container Toolkit] ( https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/supported-platforms.html )
52
+ - [ CUDA Toolkit Release Notes] ( https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id6 )
53
+
54
+ </details >
55
+
56
+ <details >
57
+ <summary ><b >Steps</b ></summary >
58
+
59
+ 1 . Check driver version and which GPU you want to use (0/1/2/3.. and update [ compose-gpu.yaml] ( ./deploy-examples/compose-gpu.yaml ) file or use ` count: all ` )
60
+
61
+ ``` sh
62
+ nvidia-smi
63
+ ```
64
+
65
+ 2. Check if the NVIDIA Container Toolkit is installed/updated
66
+
67
+ ` ` ` sh
68
+ # debian
69
+ dpkg -l | grep nvidia-container-toolkit
70
+ ` ` `
71
+
72
+ ` ` ` sh
73
+ # rhel
74
+ rpm -q nvidia-container-toolkit
75
+ ` ` `
76
+
77
+ NVIDIA Container Toolkit install steps can be found here:
78
+
79
+ < https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html>
80
+
81
+ 3. Check which runtime is being used by Docker
82
+
83
+ ` ` ` sh
84
+ # docker
85
+ docker info | grep -i runtime
86
+ ` ` `
87
+
88
+ 4. If the default Docker runtime changes back from ' nvidia' to ' default' after restarting the Docker service (optional):
89
+
90
+ Backup the daemon.json file:
91
+
92
+ ` ` ` sh
93
+ sudo cp /etc/docker/daemon.json /etc/docker/daemon.json.bak
94
+ ` ` `
95
+
96
+ Update the daemon.json file:
97
+
98
+ ` ` ` sh
99
+ echo ' {
100
+ "runtimes": {
101
+ "nvidia": {
102
+ "path": "nvidia-container-runtime"
103
+ }
104
+ },
105
+ "default-runtime": "nvidia"
106
+ }' | sudo tee /etc/docker/daemon.json > /dev/null
107
+ ` ` `
108
+
109
+ Restart the Docker service:
110
+
111
+ ` ` ` sh
112
+ sudo systemctl restart docker
113
+ ` ` `
114
+
115
+ Confirm ' nvidia' is the default runtime used by Docker by repeating step 3.
116
+
117
+ 5. Run the container:
118
+
119
+ ` ` ` sh
120
+ docker compose -f docs/deploy-examples/compose-gpu.yaml up -d
121
+ ` ` `
122
+
123
+ < /details>
2
124
3
125
# # OpenShift
4
126
127
+ # ## Simple deployment
128
+
129
+ Manifest example: [docling-serve-simple.yaml](./deploy-examples/docling-serve-simple.yaml)
130
+
131
+ This deployment example has the following features:
132
+
133
+ - Deployment configuration
134
+ - Service configuration
135
+ - NVIDIA cuda enabled
136
+
137
+ Install the app with:
138
+
139
+ ` ` ` sh
140
+ oc apply -f docs/deploy-examples/docling-serve-simple.yaml
141
+ ` ` `
142
+
143
+ For using the API:
144
+
145
+ ` ` ` sh
146
+ # Port-forward the service
147
+ oc port-forward svc/docling-serve 5001:5001
148
+
149
+ # Make a test query
150
+ curl -X ' POST' \
151
+ " localhost:5001/v1alpha/convert/source/async" \
152
+ -H " accept: application/json" \
153
+ -H " Content-Type: application/json" \
154
+ -d ' {
155
+ "http_sources": [{"url": "https://arxiv.org/pdf/2501.17887"}]
156
+ }'
157
+ ` ` `
158
+
5
159
# ## Secure deployment with `oauth-proxy`
6
160
7
161
Manifest example: [docling-serve-oauth.yaml](./deploy-examples/docling-serve-oauth.yaml)
@@ -15,7 +169,7 @@ This deployment has the following features:
15
169
Install the app with:
16
170
17
171
` ` ` sh
18
- kubectl apply -f docs/deploy-examples/docling-serve-oauth.yaml
172
+ oc apply -f docs/deploy-examples/docling-serve-oauth.yaml
19
173
` ` `
20
174
21
175
For using the API:
0 commit comments