### Run Kimchi Setup Wizard Source: https://docs.cast.ai/docs/ai-enabler-serverless-kimchi-cli Launch the interactive setup wizard for Kimchi if you installed it manually. ```shell kimchi ``` -------------------------------- ### Install Kimchi with One-Line Installer Source: https://docs.cast.ai/docs/ai-enabler-serverless-kimchi-cli Use this command to quickly install Kimchi and automatically launch the setup wizard. ```shell curl -fsSL https://github.com/castai/kimchi/releases/latest/download/install.sh | bash ``` -------------------------------- ### Install OpenCode Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-opencode Install OpenCode using curl. This command fetches the installation script and executes it. ```bash curl -fsSL https://opencode.ai/install | bash ``` -------------------------------- ### Install GSD Framework Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-opencode Install the Get Shit Done (GSD) framework using npm. This command is used to set up the necessary tools for multi-agent orchestration. ```bash npx gsd-opencode ``` -------------------------------- ### Install castctl using a script Source: https://docs.cast.ai/docs/connect-with-castctl Install the castctl CLI on macOS or Linux using a provided installation script. The script defaults to installing in `~/.local/bin`. ```shell curl -fsSL https://get.cast.ai/linux | bash ``` -------------------------------- ### Spot Configuration Examples Source: https://docs.cast.ai/docs/pod-mutations-reference Examples of configuring Spot instance behavior with different modes and distribution percentages. ```yaml # 80% Spot with fallback to On-Demand spotConfig: mode: preferred-spot distributionPercentage: 80 ``` ```yaml # 100% Spot, strict (no fallback) spotConfig: mode: only-spot distributionPercentage: 100 ``` ```yaml # 50/50 split, no preference when both available spotConfig: mode: optional-spot distributionPercentage: 50 ``` ```yaml # No Spot configuration (empty object) spotConfig: {} ``` -------------------------------- ### Overprovisioning Example Calculation Source: https://docs.cast.ai/docs/cluster-efficiency-report An example demonstrating the overprovisioning percentage calculation with sample CPU values. ```text 100% - (490 ÷ 688 × 100%) = 100% - 71.22% = 28.78% ``` -------------------------------- ### Install castctl on Windows Source: https://docs.cast.ai/docs/connect-with-castctl Install the castctl CLI on Windows using PowerShell. This method downloads and executes the installer. ```powershell iwr -useb https://get.cast.ai/windows | iex ``` -------------------------------- ### Install kubectl using Homebrew Source: https://docs.cast.ai/docs/omni-getting-started Installs the Kubernetes CLI tool using the Homebrew package manager. Ensure you have Homebrew installed and configured. ```bash brew install kubectl ``` -------------------------------- ### Install Google Cloud CLI using Homebrew Source: https://docs.cast.ai/docs/omni-getting-started Installs the Google Cloud SDK using Homebrew, necessary for interacting with Google Cloud Platform edge locations. Homebrew must be installed. ```bash brew install --cask google-cloud-sdk ``` -------------------------------- ### Install egressd Demo Source: https://docs.cast.ai/docs/egressd Install a demo version of egressd with preconfigured Grafana and Prometheus metrics by running a script. ```shell curl -fsSL | bash ``` -------------------------------- ### Install castctl to a specific location Source: https://docs.cast.ai/docs/connect-with-castctl Install the castctl CLI to a specified directory, such as `/usr/local/bin`, using the installation script. ```shell curl -fsSL https://get.cast.ai/linux \ | bash ``` -------------------------------- ### Install Live Migration Controller Source: https://docs.cast.ai/docs/helm-charts Installs the castai-live Helm chart for the live migration controller. Requires API key and cluster ID. ```shell helm upgrade -i castai-live castai-helm/castai-live -n castai-agent \ --set castai.apiKey="" \ --set castai.clusterID="" ``` -------------------------------- ### Install Prometheus using Helm Source: https://docs.cast.ai/docs/observability-metrics-integrating-prometheus-metrics-with-new-relic Installs Prometheus in the 'monitoring' namespace using Helm. Ensure the namespace is created if it doesn't exist. ```shell helm install prometheus prometheus-community/prometheus \ --namespace monitoring \ --create-namespace ``` -------------------------------- ### Install egressd using Helm Source: https://docs.cast.ai/docs/egressd Install egressd using the Cast AI Helm chart with a values.yaml file. ```shell helm upgrade -i castai-egressd castai-helm/egressd -n castai-agent -f values.yaml ``` -------------------------------- ### Install Kentroller for Karpenter Source: https://docs.cast.ai/docs/helm-charts Installs the castai-kentroller Helm chart to coordinate Cast AI features with Karpenter. Requires API key and cluster ID. ```shell helm upgrade -i castai-kentroller castai-helm/castai-kentroller -n castai-agent \ --set castai.apiKey="" \ --set castai.clusterID="" ``` -------------------------------- ### Example Evictor Configuration Labels (JSON) Source: https://docs.cast.ai/docs/evictor This JSON object represents the same configuration labels as the YAML example, useful for programmatic access or validation. ```json { "labels": { "app.kubernetes.io/instance": "castai-evictor", "app.kubernetes.io/managed-by": "Helm", "app.kubernetes.io/name": "castai-evictor", "app.kubernetes.io/version": "v1", "charts.cast.ai/managed": "true", "helm.sh/chart": "castai-evictor-0.31.20" } } ``` -------------------------------- ### cURL GET Request Example Source: https://docs.cast.ai/docs/authentication A basic cURL command to make a GET request to a specified URL. This is a foundational example for interacting with the API. ```bash curl --request GET \ --url https://example.com/ ``` -------------------------------- ### Start OpenCode and Verify Configuration Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-opencode Navigates to a project directory and starts OpenCode to verify that the configuration is working correctly. A simple prompt is used to test the connection and model routing. ```bash cd ~/your-project opencode ``` -------------------------------- ### RBAC Permissions for Terraform Installation Source: https://docs.cast.ai/docs/castai-operator This YAML defines the necessary RBAC permissions for a pre-installation job required by the castware-components chart during Terraform installations. It grants the job permissions to get, list, and watch deployments and pods. ```yaml apiGroups: ["apps"] resources: ["deployments"] verbs: ["get", "list"] apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch"] ``` -------------------------------- ### Namespace Filter Example (Regex Match) Source: https://docs.cast.ai/docs/pod-mutations-reference Filters mutations to apply to pods in namespaces matching specific regex patterns, such as those starting with 'team-' or 'env-prod-'. ```yaml filterV2: workload: namespaces: - type: regex value: "^team-.*$" - type: regex value: "^env-prod-.*$" ``` -------------------------------- ### Making an API Call with curl Source: https://docs.cast.ai/docs/api-access Example of how to authenticate and make a GET request to the Cast AI API using curl. Ensure you replace 'your-api-key-here' with your actual API key. ```shell curl -X GET "https://api.cast.ai/v1/kubernetes/external-clusters" -H "X-API-Key: your-api-key-here" | jq ``` -------------------------------- ### Understanding Resource Cost Distribution Example Source: https://docs.cast.ai/docs/cluster-efficiency-report Illustrates the relationship between total cost and different cost metrics (per provisioned, requested, and used resources) with a simplified example. ```text (Cost per Provisioned × Provisioned Resources) = (Cost per Requested × Requested Resources) = (Cost per Used × Used Resources) = Total Cost ``` ```text Provisioned Resources > Requested Resources > Used Resources ``` ```text Cost per Provisioned < Cost per Requested < Cost per Used ``` ```text Cost per Provisioned CPU = $100 ÷ 10 = $10 Cost per Requested CPU = $100 ÷ 8 = $12.50 Cost per Used CPU = $100 ÷ 4 = $25 ``` -------------------------------- ### Full Deployment with Network Bandwidth Configuration Source: https://docs.cast.ai/docs/network-bandwidth This example demonstrates how to integrate network bandwidth requests and limits into a complete Kubernetes Deployment manifest. Ensure the `castai-omni-agent` is v1.12.5 or higher. ```yaml apiVersion: apps/v1 kind: Deployment metadata: labels: app: nginx name: nginx spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - image: nginx name: nginx resources: requests: scheduling.cast.ai/network-bandwidth: "750" limits: scheduling.cast.ai/network-bandwidth: "750" ``` -------------------------------- ### EKS MIG Partition Size Configuration Examples Source: https://docs.cast.ai/docs/gpu-sharing-mig Examples of configuring different MIG partition sizes on EKS by changing the node selector key. ```yaml nodeSelector: nvidia.com/gpu.mig-partition-1g.5gb: "true" ``` ```yaml nodeSelector: nvidia.com/gpu.mig-partition-2g.10gb: "true" ``` ```yaml nodeSelector: nvidia.com/gpu.mig-partition-3g.20gb: "true" ``` -------------------------------- ### Example OMNI pod status output Source: https://docs.cast.ai/docs/omni-getting-started This is an example of the expected output when verifying OMNI onboarding. It shows the status of various OMNI and liqo components running in the cluster. ```shell NAME READY STATUS RESTARTS AGE liqo-controller-manager-7cf59bcc64-xxxxx 1/1 Running 0 2m liqo-crd-replicator-687bdc6f66-xxxxx 1/1 Running 0 2m liqo-fabric-xxxxx 1/1 Running 0 2m liqo-ipam-8667dbccbb-xxxxx 1/1 Running 0 2m liqo-metric-agent-55cd8748c5-xxxxx 1/1 Running 0 2m liqo-proxy-77c66dfb88-xxxxx 1/1 Running 0 2m liqo-webhook-6f648484cc-xxxxx 1/1 Running 0 2m omni-agent-595c4b97d9-xxxxx 1/1 Running 0 2m ``` -------------------------------- ### Install jq on macOS Source: https://docs.cast.ai/docs/cast-ai-anywhere-getting-started Installs the jq command-line JSON processor required by the installation script on macOS systems. ```shell brew install jq ``` -------------------------------- ### Create Scaling Policy Source: https://docs.cast.ai/docs/woop-scaling-policies-create This example demonstrates how to create a scaling policy with immediate apply type, managed policy, CPU/memory targets, and specific workload and namespace assignment rules. ```APIDOC ## Create Scaling Policy ### Description Creates a new scaling policy with specified optimization settings and assignment rules. ### Method POST (Assumed based on creation context) ### Endpoint /websites/cast_ai/scaling-policies (Assumed based on project path) ### Parameters #### Request Body - **name** (string) - Required - The name of the scaling policy. - **applyType** (string) - Required - The type of scaling application (e.g., IMMEDIATE). - **managementPolicy** (string) - Required - The management policy type (e.g., MANAGED). - **cpu** (object) - Optional - CPU optimization settings. - **target** (string) - Required - The CPU target (e.g., p95, max). - **overhead** (number) - Optional - CPU overhead percentage. - **memory** (object) - Optional - Memory optimization settings. - **target** (string) - Required - The memory target (e.g., max). - **overhead** (number) - Optional - Memory overhead percentage. - **assignmentRules** (array) - Required - A list of rules to determine policy assignment. - Each rule can contain a `workload` matcher, a `namespace` matcher, or both. - Multiple matchers within a single rule are combined with AND logic. - Multiple rules within a policy are combined with OR logic. **Workload Matcher:** - **gvk** (array of strings) - Required - Kubernetes workload types to match (e.g., ["Deployment", "StatefulSet"]). - **labelsExpressions** (array of objects) - Optional - Label-based matching conditions. - **key** (string) - Required - The label key. - **operator** (string) - Required - The label operator (e.g., KUBERNETES_LABEL_SELECTOR_OP_IN). - **values** (array of strings) - Required if operator requires values - The list of values for the operator. **Namespace Matcher:** - **names** (array of strings) - Required - Specific namespace names to match (e.g., ["production", "prod-frontend"]). ### Request Example ```json { "name": "production-frontend-policy", "applyType": "IMMEDIATE", "managementPolicy": "MANAGED", "cpu": { "target": "p95", "overhead": 0.05 }, "memory": { "target": "max", "overhead": 0.10 }, "assignmentRules": [ { "workload": { "gvk": ["Deployment", "StatefulSet"], "labelsExpressions": [ { "key": "tier", "operator": "KUBERNETES_LABEL_SELECTOR_OP_IN", "values": ["frontend", "web"] } ] } }, { "namespace": { "names": ["production", "prod-frontend"] } } ] } ``` ### Response #### Success Response (200) (Response structure not provided in source text) #### Response Example (Response example not provided in source text) ``` -------------------------------- ### Install jq on Debian/Ubuntu Source: https://docs.cast.ai/docs/cast-ai-anywhere-getting-started Installs the jq command-line JSON processor required by the installation script on Debian/Ubuntu systems. ```shell apt-get install jq ``` -------------------------------- ### Install Cline CLI Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-cline Install the Cline CLI globally using npm. Ensure you have Node.js 20 or higher installed. ```shell npm install -g cline ``` -------------------------------- ### Basic API Policy Creation Source: https://docs.cast.ai/docs/woop-scaling-policies-create This example demonstrates the creation of a basic scaling policy via API, including immediate scaling, CPU/memory targets, and assignment rules based on workload labels and namespaces. ```json { "name": "production-frontend-policy", "applyType": "IMMEDIATE", "managementPolicy": "MANAGED", "cpu": { "target": "p95", "overhead": 0.05 }, "memory": { "target": "max", "overhead": 0.10 }, "assignmentRules": [ { "workload": { "gvk": ["Deployment", "StatefulSet"], "labelsExpressions": [ { "key": "tier", "operator": "KUBERNETES_LABEL_SELECTOR_OP_IN", "values": ["frontend", "web"] } ] } }, { "namespace": { "names": ["production", "prod-frontend"] } } ] } ``` -------------------------------- ### Cloud SQL Proxy Configuration Example Source: https://docs.cast.ai/docs/performance-advisor-installing-agent Example values.yaml configuration for enabling Cloud SQL Proxy. Set the database host to the instance connection name and configure the cloudSqlProxy section. ```yaml database: host: cloudSqlProxy: enabled: true port: 10000 privateIp: true autoIamAuthn: true collectors: excludedDatabases: "cloudsqladmin" ``` -------------------------------- ### Install NVIDIA DRA Driver on GKE Source: https://docs.cast.ai/docs/dra This script installs GPU drivers, creates the 'nvidia' namespace, applies a ResourceQuota, and installs the NVIDIA DRA driver using Helm. Ensure you have kubectl and Helm installed. ```shell #!/bin/bash # Install GPU drivers (GKE documentation: https://cloud.google.com/kubernetes-engine/docs/how-to/gpus#installing_drivers) kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/master/nvidia-driver-installer/cos/daemonset-preloaded-latest.yaml # Install NVIDIA DRA driver kubectl create namespace nvidia kubectl apply -n nvidia -f - << EOF apiVersion: v1 kind: ResourceQuota metadata: name: nvidia spec: hard: pods: 100 scopeSelector: matchExpressions: - operator: In scopeName: PriorityClass values: - system-node-critical - system-cluster-critical EOF cat < values.yaml resources.gpus.enabled: "true" gpuResourcesEnabledOverride: "true" nvidiaDriverRoot: /home/kubernetes/bin/nvidia/ controller: affinity: null kubeletPlugin: tolerations: - key: nvidia.com/gpu operator: Exists effect: NoSchedule nodeSelector: nvidia.com/gpu.present: "true" affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: "nvidia.com/gpu.present" operator: "Exists" - key: nvidia.com/gpu.dra operator: In values: - "true" EOF helm upgrade -i nvidia-dra-driver-gpu \ oci://registry.k8s.io/dra-driver-nvidia/charts/dra-driver-nvidia-gpu \ --namespace nvidia \ -f values.yaml ``` -------------------------------- ### Recommendation Object with Startup Phase Source: https://docs.cast.ai/docs/woop-startup-recommendations This YAML defines a Recommendation object that includes both the startup phase (original CPU requests) and the post-startup phase (optimized CPU requests) for a container. The startup duration is also specified. ```yaml apiVersion: autoscaling.cast.ai/v2 kind: Recommendation metadata: name: nginx-deployment spec: targetRef: apiVersion: apps/v1 kind: Deployment name: nginx ... # startup phase: original workload CPU requests recommendation: - containerName: nginx requests: cpu: 300m memory: 300Mi startup: duration: "5m" postStartup: verticalHash: abc1e2323asda recommendation: - containerName: nginx requests: cpu: 150m memory: 150Mi ``` -------------------------------- ### Install jq on Red Hat/CentOS Source: https://docs.cast.ai/docs/cast-ai-anywhere-getting-started Installs the jq command-line JSON processor required by the installation script on Red Hat/CentOS systems. ```shell yum install jq ``` -------------------------------- ### View Downloaded Init Script Source: https://docs.cast.ai/docs/omni-custom-edge-location Inspect the init script that was downloaded and executed by the agent. ```shell cat /var/lib/castai-edge-initd/init_script ``` -------------------------------- ### Install Cast AI Evictor Source: https://docs.cast.ai/docs/helm-charts Install the Evictor component to reduce cluster size. Set dryRun to false for actual eviction. This command is for basic installation. ```shell helm upgrade -i castai-evictor castai-helm/castai-evictor -n castai-agent --set dryRun=false ``` -------------------------------- ### Install AWS CLI using Homebrew Source: https://docs.cast.ai/docs/omni-getting-started Installs the AWS Command Line Interface using Homebrew, required for managing AWS resources in edge locations. Ensure you have Homebrew installed. ```bash brew install awscli ``` -------------------------------- ### Install Hibernate Component with Helm Source: https://docs.cast.ai/docs/pausing-a-cluster Install the Cast AI hibernate component using Helm. Ensure you have Helm installed and configured. Update the 'cloud' and 'apiKey' variables with your specific values. ```shell helm upgrade -i castai-hibernate castai-helm/castai-hibernate -n castai-agent --set cloud= --set apiKey= ``` -------------------------------- ### Complete Kubernetes Deployment for GPU Time-Slicing Workload Source: https://docs.cast.ai/docs/gpu-sharing-time-slicing A full Kubernetes Deployment example demonstrating how to schedule multiple pods on a single GPU using time-slicing. It includes node selectors and tolerations to target GPU-sharing enabled nodes. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: gpu-timeslicing-workload spec: replicas: 10 # Can schedule 10 pods on a single GPU with 10x sharing selector: matchLabels: app: gpu-timeslicing-workload template: metadata: labels: app: gpu-timeslicing-workload spec: nodeSelector: scheduling.cast.ai/node-template: "gpu-sharing-template" tolerations: - key: "scheduling.cast.ai/node-template" operator: "Exists" effect: "NoSchedule" containers: - name: gpu-workload image: your-gpu-image resources: limits: nvidia.com/gpu: 1 ``` -------------------------------- ### Install OCI CLI using curl script Source: https://docs.cast.ai/docs/omni-getting-started Installs the Oracle Cloud Infrastructure Command Line Interface by downloading and executing an installation script from a GitHub repository. This is for OCI edge locations. ```bash bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" ``` -------------------------------- ### Complete filterV2 Example Source: https://docs.cast.ai/docs/pod-mutations-reference This example demonstrates a comprehensive filterV2 configuration, specifying workload and pod matching criteria including namespaces, names, kinds, labels, and exclusions. ```yaml filterV2: workload: namespaces: - type: exact value: production names: - type: regex value: "^frontend-.*$" kinds: - type: exact value: Deployment - type: exact value: StatefulSet excludeNames: - type: exact value: frontend-canary pod: labels: matchers: - keyMatcher: type: exact value: tier valueMatcher: type: exact value: web operator: and excludeLabels: matchers: - keyMatcher: type: exact value: skip-mutation valueMatcher: type: exact value: "true" operator: or ``` -------------------------------- ### Make Kimchi Binary Executable Source: https://docs.cast.ai/docs/ai-enabler-serverless-kimchi-cli Set execute permissions for the downloaded Kimchi binary. ```shell chmod +x kimchi ``` -------------------------------- ### Install Exporter with Helm Source: https://docs.cast.ai/docs/woop-custom-metrics Install the castai-workload-autoscaler-exporter using Helm if it was not included during cluster onboarding. ```shell helm repo add castai-helm https://castai.github.io/helm-charts helm repo update helm install castai-workload-autoscaler-exporter castai-helm/castai-workload-autoscaler-exporter -n castai-agent ``` -------------------------------- ### Create OpenCode Configuration File Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-opencode Creates an empty JSON file to store the OpenCode configuration. This file will be populated with provider details. ```bash touch ~/.config/opencode/opencode.json ``` -------------------------------- ### Manual Evictor Installation Source: https://docs.cast.ai/docs/evictor Helm command for manual installation of the Cast AI Evictor. ```shell helm repo add castai-helm https://castai.github.io/helm-charts helm upgrade --install castai-evictor castai-helm/castai-evictor -n castai-agent --set dryRun=false ``` -------------------------------- ### Install GPU Metrics Exporter Helm Chart Source: https://docs.cast.ai/docs/gpu-metrics-exporter Installs the gpu-metrics-exporter Helm chart using the specified namespace and values file. Ensure 'values.yaml' is correctly configured with cluster details. ```shell helm install --generate-name castai-helm/gpu-metrics-exporter -n castai-agent -f values.yaml ``` -------------------------------- ### Verify Kimchi Installation Source: https://docs.cast.ai/docs/ai-enabler-serverless-kimchi-cli Check if Kimchi is installed correctly by running the version command. ```shell kimchi version ``` -------------------------------- ### ipDetails JSON Example Source: https://docs.cast.ai/docs/setup-notification-webhook This is an example JSON object representing IP address details. ```json { "ip_address": "118.25.6.39", "ip_version": 4, "country_code": "CN", "isp": "Tencent Cloud Computing (Beijing) Co. Ltd", "domain": "tencent.com", "hostnames": [], "is_tor": false } ``` -------------------------------- ### Evictor Installation with Aggressive Mode Source: https://docs.cast.ai/docs/evictor Helm command to install Evictor with aggressive mode enabled. ```shell helm upgrade --install castai-evictor castai-helm/castai-evictor -n castai-agent \ --set dryRun=false,aggressiveMode=true ``` -------------------------------- ### GKE MIG Partition Size Configuration Examples Source: https://docs.cast.ai/docs/gpu-sharing-mig Examples of configuring different MIG partition sizes on GKE by changing the node selector value. ```yaml nodeSelector: cloud.google.com/gke-gpu-partition-size: 1g.5gb ``` ```yaml nodeSelector: cloud.google.com/gke-gpu-partition-size: 2g.10gb ``` ```yaml nodeSelector: cloud.google.com/gke-gpu-partition-size: 3g.20gb ``` -------------------------------- ### Verify castctl installation Source: https://docs.cast.ai/docs/connect-with-castctl Check if the castctl CLI is installed correctly by running the version command. ```shell castctl version ``` -------------------------------- ### Verify Cline Installation Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-cline Check if the Cline CLI is installed correctly by running the version command. ```shell cline version ``` -------------------------------- ### Example DCGM Metrics for Fractional GPUs Source: https://docs.cast.ai/docs/gpu-sharing-fractional This snippet shows example output from DCGM metrics, illustrating the limited metrics available for fractional GPUs compared to full GPUs. These metrics are useful for basic monitoring. ```shell # HELP DCGM_FI_DEV_MEMORY_TEMP Memory temperature for the device. # TYPE DCGM_FI_DEV_MEMORY_TEMP gauge DCGM_FI_DEV_MEMORY_TEMP{gpu="0",UUID="GPU-e5de654e-ae57-11f0-92fa-d4c3671e2bf4",pci_bus_id="00000000:31:00.0",device="nvidia0",modelName="NVIDIA L4-3Q",Hostname="ip-192-168-119-184.eu-central-1.compute.internal",container="gpu-test",namespace="default",pod="gpu-test-685ff6d954-5jdfh"} 0 # HELP DCGM_FI_DEV_FB_TOTAL Total Frame Buffer of the GPU in MB. # TYPE DCGM_FI_DEV_FB_TOTAL gauge DCGM_FI_DEV_FB_TOTAL{gpu="0",UUID="GPU-e5de654e-ae57-11f0-92fa-d4c3671e2bf4",pci_bus_id="00000000:31:00.0",device="nvidia0",modelName="NVIDIA L4-3Q",Hostname="ip-192-168-119-184.eu-central-1.compute.internal",container="gpu-test",namespace="default",pod="gpu-test-685ff6d954-5jdfh"} 3072 # HELP DCGM_FI_DEV_FB_FREE Framebuffer memory free (in MiB). # TYPE DCGM_FI_DEV_FB_FREE gauge DCGM_FI_DEV_FB_FREE{gpu="0",UUID="GPU-e5de654e-ae57-11f0-92fa-d4c3671e2bf4",pci_bus_id="00000000:31:00.0",device="nvidia0",modelName="NVIDIA L4-3Q",Hostname="ip-192-168-119-184.eu-central-1.compute.internal",container="gpu-test",namespace="default",pod="gpu-test-685ff6d954-5jdfh"} 2418 # HELP DCGM_FI_DEV_FB_USED Framebuffer memory used (in MiB). # TYPE DCGM_FI_DEV_FB_USED gauge DCGM_FI_DEV_FB_USED{gpu="0",UUID="GPU-e5de654e-ae57-11f0-92fa-d4c3671e2bf4",pci_bus_id="00000000:31:00.0",device="nvidia0",modelName="NVIDIA L4-3Q",Hostname="ip-192-168-119-184.eu-central-1.compute.internal",container="gpu-test",namespace="default",pod="gpu-test-685ff6d954-5jdfh"} 0 ``` -------------------------------- ### Combined Init Script and NodeConfig Source: https://docs.cast.ai/docs/node-configuration Pass both a `nodeadm` NodeConfig and a shell script together using MIME multipart. This example configures Kubelet eviction settings and runs a custom shell script. ```yaml MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOUNDARY" --BOUNDARY Content-Type: application/node.eks.aws --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: kubelet: config: evictionMaxPodGracePeriod: 30 --BOUNDARY Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash echo "a script has run during node provisioning" > /var/log/node-configuration-init-script-out.txt --BOUNDARY-- ``` -------------------------------- ### Start Claude Code in a Project Directory Source: https://docs.cast.ai/docs/ai-enabler-tutorial-serverless-claude-code Navigate to your project directory and start Claude Code to verify the configuration. This command initiates the AI-assisted coding environment. ```shell cd ~/your-project claude ``` -------------------------------- ### Evictor Installation with Combined Modes Source: https://docs.cast.ai/docs/evictor Helm command to install Evictor with both aggressive and scoped modes enabled. ```shell helm upgrade --install castai-evictor castai-helm/castai-evictor -n castai-agent \ --set dryRun=false,aggressiveMode=true,scopedMode=true ``` -------------------------------- ### Install Workload Autoscaler Source: https://docs.cast.ai/docs/helm-charts Installs the castai-workload-autoscaler Helm chart. Requires API key and cluster ID. ```shell helm upgrade -i castai-workload-autoscaler castai-helm/castai-workload-autoscaler -n castai-agent \ --set castai.apiKey="" \ --set castai.clusterID="" ```