Oracle
This guide covers deploying NIM LLM and VLM on Oracle Cloud Infrastructure (OCI) using OKE (Oracle Kubernetes Engine), a managed Kubernetes service for running containerized workloads on OCI.
Deploy on OCI using OKE
Create an OKE cluster with GPU-capable worker nodes and prepare the OCI environment for NIM LLM and VLM workloads. This section covers prerequisites, cluster creation, and initial setup.
Prerequisites
Install the following tools before proceeding:
You also need an NGC API key with access to NIM LLM and VLM container images and Helm charts.
Your OCI tenancy must have GPU quota available in the target region. Verify quota in the OCI Console under Limits, Quotas and Usage and ensure the compartment has a configured VCN, subnets, internet gateway, route table, and security lists.
Match the OCI GPU shape to the model you plan to serve. Larger models require more aggregate VRAM and may need multi-GPU shapes — 70B-class models can require up to 8 GPUs depending on precision and tensor parallelism. Refer to the OCI GPU shape documentation for available options.
OKE’s default and recommended CNI is OCI VCN-Native Pod Networking, which assigns each pod its own routable VCN VNIC. Pod VNICs do not receive public IPv4 addresses, so a default Internet Gateway route cannot NAT outbound pod traffic, and pulls from HuggingFace, NGC, or any other public registry from inside the pod will time out.
If you use Quick Create, you must add a NAT Gateway and a dedicated private pod subnet routed through it before deploying NIM LLM and VLM. Refer to Networking Prerequisites below.
Networking Prerequisites
Skip this section if you are bringing your own VCN with a NAT Gateway and a dedicated pod subnet already configured. Apply it once per Quick Create cluster.
The node pool update applies only to new nodes. If your GPU node was provisioned before the change, terminate it (or scale the node pool down and back up) so OKE replaces it with a node whose pod VNICs come from the NAT-routed subnet. Existing node IDs continue to use the old pod subnet until they are recycled.
After the new node is Ready, confirm pods scheduled on it land on the new subnet:
Create an OKE Cluster through OCI
Set environment variables used throughout this guide:
Create an OKE cluster with a GPU-capable node pool using the OCI Console:
- Navigate to Developer Services > Kubernetes Clusters (OKE) > Create cluster and select Quick create.
- Configure a public API endpoint and choose a GPU shape appropriate for your model.
- Under Advanced options, set the boot volume size to at least 500 GB. The OCI default (approximately 47 GB, presenting as approximately 35 GB inside the OS) is exhausted by NIM LLM and VLM container images and the model cache during a single deployment.
- Submit and wait for the cluster to provision.
For production workloads, use an Enhanced cluster (includes a financially-backed SLA).
After the cluster is created, configure kubectl access:
Verify connectivity by running:
Expand the Boot Volume
OKE does not automatically grow the on-disk filesystem inside the OS, even when the boot volume itself is sized correctly at the node-pool level. Expand the file system before deployment. Without this step, the node hits DiskPressure during deployment, and pods are evicted.
Check first:
If ephemeral-storage reads as approximately 35 GB (about 37206272Ki), grow the filesystem in-place using a privileged pod (no SSH access required):
Re-run the kubectl describe nodes check to confirm ephemeral-storage now matches the boot volume size.
Install the NVIDIA GPU Operator
The NVIDIA GPU Operator manages the GPU device plugin, container toolkit, and runtime class on OKE nodes. OKE GPU node images ship with the NVIDIA driver pre-installed, so the operator is deployed with the bundled driver disabled:
OKE GPU node pools occasionally attach a nvidia.com/gpu:NoSchedule taint to the node. The chart tolerates the taint, but clearing it lets non-GPU workloads share the node:
Verify the operator is running and GPUs are visible to the cluster:
If a node advertises fewer GPUs than its shape provides, restart the device plugin:
For more information, refer to the NVIDIA GPU Operator documentation.
Create Kubernetes Secrets
The Helm chart requires two secrets in the deployment namespace. Missing either one causes the pod to fail with CreateContainerConfigError after scheduling:
ngc-secret(typedocker-registry) is used by the kubelet to pull images fromnvcr.io.ngc-api(typegeneric) is mounted as theNGC_API_KEYenvironment variable so the pod can authenticate to NGC for the model download.
Confirm both secrets exist and ngc-api is non-empty:
Create a Persistent Volume Claim
NIM LLM and VLM requires persistent storage to cache the downloaded model across pod restarts. The Helm chart provisions a PVC automatically when you set persistence.enabled=true on helm install (covered in the next section). The PVC uses the cluster’s default storage class, which is oci-bv on OKE for OCI Block Volume.
For faster cold starts on large models, optionally create an Ultra High Performance Block Volume storage class and reference it with persistence.storageClass:
Deploy NIM LLM and VLM with Helm
-
Fetch the Helm chart from NGC:
-
Optional: View the default chart values to understand available configuration options.
For help choosing the right model configuration, refer to Model Profiles and Selection.
-
Install the chart with inline
--setflags. The following example uses nvcr.io/nim/meta/llama-3.1-8b-instruct on a single GPU. Adjust the image, GPU count, andpersistence.sizeto match your model.The chart’s default
persistence.sizeof 50Gi does not provide enough headroom for the model weights and the container image cache. Use 80Gi as a safe minimum for approximately 10 GB to 16 GB model weights, and increase the size proportionally for larger models.NIM_MAX_MODEL_LENcaps the KV-cache allocation to fit the available VRAM. Adjust per your shape’s GPU memory.If you created the optional
oci-bv-uhpstorage class in the previous section, add--set persistence.storageClass=oci-bv-uhpto the command above to provision the PVC on Ultra High Performance block storage. Omit this flag to use the cluster default (oci-bv).
Verify the Deployment
-
Watch the pod come up:
First-time startup includes image pull, model download from NGC, and engine initialization. Expect five to ten minutes on the
oci-bv-uhpstorage class and 15 to 25 minutes on defaultoci-bv. -
Confirm the chart and NIM LLM and VLM versions, and that the GPU is bound to the pod:
-
List the served model and send a test inference request from inside the pod:
Replace
<MODEL_NAME>with the value advertised by/v1/models. -
To call the service from outside the cluster, use
kubectl port-forward:
The chart’s built-in helm test "$RELEASE_NAME" validation uses curlimages/curl:8.6.0 from Docker Hub by short name. This works on OKE node images whose container runtime resolves unqualified references against Docker Hub by default — including standard OKE worker nodes (containerd) and OKE GPU nodes that ship with permissive CRI-O short-name resolution. OKE Gen2 GPU node images run CRI-O 1.34 with strict short-name resolution and require fully-qualified image references; on those node pools, validate inference with the kubectl exec and kubectl port-forward commands above instead — they cover the same /v1/health/ready, /v1/models, and /v1/chat/completions endpoints the chart’s test pods exercise.
Teardown
To remove all resources created by this guide:
If you created a dedicated NAT-routed pod subnet for this deployment (refer to Networking Prerequisites), remove the subnet, route table, and NAT Gateway after the cluster is deleted:
Deleting the cluster does not automatically remove associated OCI Block Volumes, Load Balancers, NAT Gateways, or custom subnets. Delete these manually from the OCI Console to avoid ongoing charges.
Next Steps
Refer to the following Oracle documentation for more information:
- Oracle Kubernetes Engine (OKE) documentation
- Model Download — Mirror NGC models to OCI Object Storage (S3-compatible) or serve from
NIM_MODEL_PATH - Model Profiles and Selection — Choose a profile for your GPU shape