Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/_core/schemas/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ this._socket.on('open', () => {
name: 'Python',
content: <Prism language="python">
{`
this._socket = new WebSocket(this._url);
this._socket = WebSocket(this._url)
this._socket.on('open', () => {
log.debug("connected");
});`}
Expand Down
6 changes: 3 additions & 3 deletions site/_core/schemas/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const items = [
--addons registry \
--addons registry-aliases \
--addons storage-provisioner \
--kubernetes-version=v1.23.5`}
--kubernetes-version=v1.33.4`}
</Prism>
},
{
Expand All @@ -21,7 +21,7 @@ const items = [
--addons=registry ^
--addons=registry-aliases ^
--addons=storage-provisioner ^
--kubernetes-version=v1.23.5`}
--kubernetes-version=v1.33.4`}
</Prism>
},
{
Expand All @@ -32,7 +32,7 @@ const items = [
--addons=registry \
--addons=registry-aliases \
--addons=storage-provisioner \
--kubernetes-version=v1.23.5`}
--kubernetes-version=v1.33.4`}
</Prism>
},
];
Expand Down
2 changes: 1 addition & 1 deletion site/learn/Algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ Each event has a specific handler, as described below.
The initialize event is the first event that HKube sends to your algorithm.
The payload of this event includes the pipeline data and the input for your algorithm.
You need to store the input in a local variable for later use.
> same input as written in the [descriptor](../learn/input/)
> same input as written in the [descriptor](../input/)

```hkube-tabs
# { "hkube": true, "schema": "handle-messages-initialize" }
Expand Down
2 changes: 1 addition & 1 deletion site/learn/InstallHkube.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Current context is now "default"
### 3. Start Minikube
Currently HKube requires at least 4 cpu cores and 6GB of memory, ingress controller, registry, and dynamic storage.

HKube was tested on Kubernetes v1.23.5, so to run it properly, start Minikube with:
HKube was tested on Kubernetes v1.33.4, so to run it properly, start Minikube with:
```hkube-tabs-with-copy
# { "hkube": true, "schema": "install" }
```
Expand Down
81 changes: 81 additions & 0 deletions site/learn/Kai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: KAI Integration
sidebarTitle: KAI Integration
layout: ../_core/DocsLayout
category: Learn
sublinks: Configuration, Example
permalink: /learn/kai/
next: /learn/codeapi/
---

The **KAI Scheduler** lets you control how your algorithms use resources.
It allows assigning algorithms to queues, limiting memory, and sharing GPUs between multiple algorithms to improve efficiency.

## What is KAI Scheduler?

**KAI Scheduler** is a Kubernetes component that manages how workloads are scheduled.
It supports advanced features like GPU sharing (using fractions of a GPU) and queue prioritization — allowing multiple algorithms to use the same GPU efficiently.

You can find the KAI Scheduler source code and installation guide [here](https://github.com/NVIDIA/KAI-Scheduler).

> **Important:**
> To use this feature, the KAI Scheduler **must be installed and configured** in your cluster.
> It requires **Kubernetes version 1.24.x or higher**.
> Make sure all **prerequisites** mentioned in the [KAI GitHub repository](https://github.com/NVIDIA/KAI-Scheduler) are met before enabling this integration.
> If your algorithm tries to use more resources than assigned at runtime, the request will not be strictly limited.

---

## Configuration

KAI-related settings are defined in the `kaiObject` section inside your algorithm specification.
This section allows you to control how the algorithm interacts with the scheduler, including queue assignment, memory allocation, and GPU fraction usage.

**Example of `kaiObject` configuration:**

```json
{
"kaiObject": {
"queue": "gpu-queue",
"memory": "512Mi",
"fraction": 0.5
}
}
```

### **Properties**

| Field | Type | Description | Required |
| :----------- | :----- | :--------------------------------------------------------- | :------- |
| **queue** | string | Name of the KAI queue to assign the algorithm to. | ✅ Yes |
| **memory** | string | Memory limit for the algorithm (e.g., `"512Mi"`, `"1Gi"`). | ❌ No |
| **fraction** | number | Fraction of GPU usage (e.g., `0.5` for 50% GPU). | ❌ No |

---

## Example

Below is a minimal algorithm configuration that includes `kaiObject`:

```json
{
"name": "gpu-fraction-algorithm",
"algorithmImage": "docker.io/hkubedevtest/my-gpu-algo:latest",
"cpu": 0.5,
"mem": "512Mi",
"gpu": 1,
"kaiObject": {
"queue": "gpu-queue",
"memory": "512Mi",
"fraction": 0.5
}
}
```

In this example:

* The algorithm requests **one GPU** but sets a **fraction of 0.5**, allowing the GPU to be shared between two algorithms.
* The **queue** defines which KAI-managed queue handles this algorithm.
* The **memory** value specifies an optional memory limit.

---
2 changes: 1 addition & 1 deletion site/learn/Sidecars.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: ../_core/DocsLayout
category: Learn
sublinks: Container Configuration, Volumes Usage, Environment Variables, Common Errors, Multiple Sidecars
permalink: /learn/sidecars/
next: /learn/debug/
next: /learn/kai/
---

In HKube, sidecars are additional containers that can be added to an algorithm's pod to perform supplementary tasks alongside the main algorithm container. Sidecars are a powerful way to extend the functionality of your algorithm, such as logging, monitoring, or handling auxiliary tasks.
Expand Down