Running Models on GPU

Follow the guidelines for running Models on GPU.

To run a Model Deployment on GPU, specify the number of GPUs to use per model replica, as follows. Specify the GPU count as a number.
# cat ./examples/mlflow/model-spec-cml-registry.json
{
  "namespace": "serving-default",
  "name": "mlflow-wine-test-from-registry-onnx",
  "spec": {
    "source": {
      "registrySource": {
        "modelId": "yf0o-hrxq-l0xj-8tk9",
        "version": 1
      }
    },
    "resources": {
      "gpuCount": 1
    }
  }
}
The spec.resources field supports specifying the following properties:
  • cpu - the requested number of CPU cores, which is a string as per Kubernetes standards.
  • memory - the requested amount of memory, which again follows Kubernetes conventions.
  • gpuCount - the requested number of GPUs per replica, as a number.