Chapter 12. Integrations
12.1. Using NVIDIA GPU resources with serverless applications
NVIDIA supports experimental use of GPU resources on OpenShift Container Platform. See OpenShift Container Platform on NVIDIA GPU accelerated clusters for more information about setting up GPU resources on OpenShift Container Platform.
12.1.1. Specifying GPU requirements for a service
After GPU resources are enabled for your OpenShift Container Platform cluster, you can specify GPU requirements for a Knative service using the
Using NVIDIA GPU resources is not supported for IBM Z and IBM Power Systems.
Create a Knative service and set the GPU resource requirement limit to
1by using the
$ kn service create hello --image <service-image> --limit nvidia.com/gpu=1
A GPU resource requirement limit of
1means that the service has 1 GPU resource dedicated. Services do not share GPU resources. Any other services that require GPU resources must wait until the GPU resource is no longer in use.
A limit of 1 GPU also means that applications exceeding usage of 1 GPU resource are restricted. If a service requests more than 1 GPU resource, it is deployed on a node where the GPU resource requirements can be met.
Optional. For an existing service, you can change the GPU resource requirement limit to
3by using the
$ kn service update hello --limit nvidia.com/gpu=3
12.1.2. Additional resources
- For more information about limits, see Setting resource quotas for extended resources.