Skip to content

Commit b298bd0

Browse files
committed
[WIP] Add details about GPU resources for Knative services
1 parent fbcd474 commit b298bd0

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

_topic_map.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,11 +1704,6 @@ Topics:
17041704
# Apps
17051705
- Name: Creating and managing serverless applications
17061706
File: serving-creating-managing-apps
1707-
# HA
1708-
- Name: High availability on OpenShift Serverless
1709-
File: serverless-HA
1710-
- Name: Tracing requests
1711-
File: serverless-tracing
17121707
# Knative CLI
17131708
- Name: Knative CLI
17141709
Dir: knative_cli
@@ -1752,6 +1747,18 @@ Topics:
17521747
# Channels
17531748
- Name: Using channels
17541749
File: serverless-channels
1750+
# HA
1751+
- Name: High availability on OpenShift Serverless
1752+
File: serverless-HA
1753+
# Tracing
1754+
- Name: Tracing requests
1755+
File: serverless-tracing
17551756
# Metering
17561757
- Name: Using metering with OpenShift Serverless
17571758
File: serverless-metering
1759+
# Integrations
1760+
# - Name: Integrations
1761+
# Dir: integrations
1762+
# Topics:
1763+
# - Name: Using NVIDIA GPU resources with serverless applications
1764+
# File: gpu-resources
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
include::modules/serverless-document-attributes.adoc[]
2+
[id="gpu-resources"]
3+
= Using NVIDIA GPU resources with serverless applications
4+
:context: gpu-resources
5+
include::modules/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
NVIDIA supports experimental use of GPU resources on {product-title}.
10+
See link:https://docs.nvidia.com/datacenter/kubernetes/openshift-on-gpu-install-guide/index.html[{product-title} on NVIDIA GPU accelerated clusters] for more information about setting up GPU resources on {product-title}.
11+
12+
After GPU resources are enabled for your {product-title} cluster, you can specify GPU requirements for a Knative service using the `kn` CLI.
13+
14+
.Procedure
15+
16+
You can specify a GPU resource requirement when you create a Knative service using `kn`.
17+
18+
. Create a service.
19+
. Set the GPU resource requirement limit to `1` by using `nvidia.com/gpu=1`:
20+
+
21+
----
22+
$ kn service create hello --image docker.io/knativesamples/hellocuda-go --limit nvidia.com/gpu=1
23+
----
24+
+
25+
A GPU resource requirement limit of `1` means that the service has 1 GPU resource dedicated.
26+
Services do not share GPU resources. Any other services that require GPU resources must wait until the GPU resource is no longer in use.
27+
+
28+
A limit of 1 GPU also means that applications exceeding usage of 1 GPU resource are restricted.
29+
If a service requests more than 1 GPU resource, it is deployed on a node where the GPU resource requirements can be met.
30+
31+
.Updating GPU requirements for a Knative service using `kn`
32+
33+
* Update the service. Change the GPU resource requirement limit to `3` by using `nvidia.com/gpu=3`:
34+
----
35+
$ kn service update hello --limit nvidia.com/gpu=3
36+
----
37+
38+
== Additional resources
39+
* For more information about limits, see xref:../../applications/quotas/quotas-setting-per-project.adoc[Setting resource quotas for extended resources].

serverless/integrations/images

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../images

serverless/integrations/modules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules

0 commit comments

Comments
 (0)