kalavai-client 0.5.4__tar.gz → 0.5.6__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/PKG-INFO +20 -5
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/README.md +18 -2
- kalavai_client-0.5.6/kalavai_client/__init__.py +2 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/utils.py +0 -39
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/pyproject.toml +2 -3
- kalavai_client-0.5.4/kalavai_client/__init__.py +0 -2
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/LICENSE +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/__main__.py +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/__init__.py +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/apps.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/apps_values.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/docker-compose-template.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/pool_config_template.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/pool_config_values.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/user_workspace.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/user_workspace_values.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/vpn-template.yaml +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/auth.py +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/cli.py +0 -0
- {kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/cluster.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: kalavai-client
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.6
|
4
4
|
Summary: Client app for kalavai platform
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: LLM,platform
|
@@ -26,7 +26,6 @@ Requires-Dist: Pillow (==10.3.0)
|
|
26
26
|
Requires-Dist: anvil-uplink (==0.5.1)
|
27
27
|
Requires-Dist: arguably (>=1.2.5)
|
28
28
|
Requires-Dist: build ; extra == "dev"
|
29
|
-
Requires-Dist: gputil (==1.4.0)
|
30
29
|
Requires-Dist: importlib_resources (==6.5.2)
|
31
30
|
Requires-Dist: jinja2 (==3.1.4)
|
32
31
|
Requires-Dist: netifaces (==0.11.0)
|
@@ -36,7 +35,7 @@ Requires-Dist: pyinstaller (==6.5.0) ; extra == "dev"
|
|
36
35
|
Requires-Dist: pyyaml (==6.0.2)
|
37
36
|
Requires-Dist: requests (>=2.25)
|
38
37
|
Requires-Dist: rich (==13.7.1)
|
39
|
-
Requires-Dist: setuptools (
|
38
|
+
Requires-Dist: setuptools (>70.0.0)
|
40
39
|
Requires-Dist: twine ; extra == "dev"
|
41
40
|
Project-URL: Homepage, https://platform.kalavai.net
|
42
41
|
Project-URL: Website, https://kalavai.net
|
@@ -51,7 +50,7 @@ Description-Content-Type: text/markdown
|
|
51
50
|
|
52
51
|
</div>
|
53
52
|
|
54
|
-
⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [
|
53
|
+
⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [giving a star to our GitHub project](https://github.com/kalavai-net/kalavai-client), joining our [discord channel](https://discord.gg/HJ8FNapQ), follow our [Substack](https://kalavainet.substack.com/) and give us a [review on Product Hunt](https://www.producthunt.com/products/kalavai/reviews/new).**
|
55
54
|
|
56
55
|
|
57
56
|
# Kalavai: turn your devices into a scalable LLM platform
|
@@ -145,6 +144,18 @@ From release **v0.5.0, you can now install `kalavai` client in non-worker comput
|
|
145
144
|
|
146
145
|
- Python 3.10+
|
147
146
|
|
147
|
+
If you see the following error:
|
148
|
+
|
149
|
+
```bash
|
150
|
+
fatal error: Python.h: No such file or directory | #include <Python.h>
|
151
|
+
```
|
152
|
+
|
153
|
+
Make sure you also install python3-dev package. For ubuntu distros:
|
154
|
+
|
155
|
+
```bash
|
156
|
+
sudo apt install python3-dev
|
157
|
+
```
|
158
|
+
|
148
159
|
|
149
160
|
### Install the client
|
150
161
|
|
@@ -257,7 +268,10 @@ Anything missing here? Give us a shout in the [discussion board](https://github.
|
|
257
268
|
Python version <= 3.12.
|
258
269
|
|
259
270
|
```bash
|
260
|
-
|
271
|
+
sudo add-apt-repository ppa:deadsnakes/ppa
|
272
|
+
sudo apt update
|
273
|
+
sudo apt install python3.10 python3.10-dev
|
274
|
+
virtualenv -p python3.10 env
|
261
275
|
source env/bin/activate
|
262
276
|
sudo apt install python3.10-venv python3.10-dev -y
|
263
277
|
pip install -e .[dev]
|
@@ -277,3 +291,4 @@ To run the unit tests, use:
|
|
277
291
|
python -m unittest
|
278
292
|
```
|
279
293
|
|
294
|
+
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
</div>
|
9
9
|
|
10
|
-
⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [
|
10
|
+
⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [giving a star to our GitHub project](https://github.com/kalavai-net/kalavai-client), joining our [discord channel](https://discord.gg/HJ8FNapQ), follow our [Substack](https://kalavainet.substack.com/) and give us a [review on Product Hunt](https://www.producthunt.com/products/kalavai/reviews/new).**
|
11
11
|
|
12
12
|
|
13
13
|
# Kalavai: turn your devices into a scalable LLM platform
|
@@ -101,6 +101,18 @@ From release **v0.5.0, you can now install `kalavai` client in non-worker comput
|
|
101
101
|
|
102
102
|
- Python 3.10+
|
103
103
|
|
104
|
+
If you see the following error:
|
105
|
+
|
106
|
+
```bash
|
107
|
+
fatal error: Python.h: No such file or directory | #include <Python.h>
|
108
|
+
```
|
109
|
+
|
110
|
+
Make sure you also install python3-dev package. For ubuntu distros:
|
111
|
+
|
112
|
+
```bash
|
113
|
+
sudo apt install python3-dev
|
114
|
+
```
|
115
|
+
|
104
116
|
|
105
117
|
### Install the client
|
106
118
|
|
@@ -213,7 +225,10 @@ Anything missing here? Give us a shout in the [discussion board](https://github.
|
|
213
225
|
Python version <= 3.12.
|
214
226
|
|
215
227
|
```bash
|
216
|
-
|
228
|
+
sudo add-apt-repository ppa:deadsnakes/ppa
|
229
|
+
sudo apt update
|
230
|
+
sudo apt install python3.10 python3.10-dev
|
231
|
+
virtualenv -p python3.10 env
|
217
232
|
source env/bin/activate
|
218
233
|
sudo apt install python3.10-venv python3.10-dev -y
|
219
234
|
pip install -e .[dev]
|
@@ -232,3 +247,4 @@ To run the unit tests, use:
|
|
232
247
|
```bash
|
233
248
|
python -m unittest
|
234
249
|
```
|
250
|
+
|
@@ -2,7 +2,6 @@ import json, base64
|
|
2
2
|
import os
|
3
3
|
import requests
|
4
4
|
from pathlib import Path
|
5
|
-
from urllib.parse import urljoin
|
6
5
|
import shutil
|
7
6
|
import subprocess
|
8
7
|
import re
|
@@ -12,10 +11,7 @@ from jinja2 import Template
|
|
12
11
|
|
13
12
|
from rich.table import Table
|
14
13
|
import yaml
|
15
|
-
import platform
|
16
|
-
import psutil
|
17
14
|
|
18
|
-
import GPUtil
|
19
15
|
|
20
16
|
from kalavai_client.auth import KalavaiAuthClient
|
21
17
|
|
@@ -387,41 +383,6 @@ def encode_dict(data: dict):
|
|
387
383
|
def decode_dict(str_data: str):
|
388
384
|
return json.loads(base64.b64decode(str_data.encode()))
|
389
385
|
|
390
|
-
def get_gpus():
|
391
|
-
GPUs = GPUtil.getGPUs()
|
392
|
-
gpus = []
|
393
|
-
for gpu in GPUs:
|
394
|
-
name = "nvidia" if "nvidia" in gpu.name.lower() else None
|
395
|
-
if name is None:
|
396
|
-
continue
|
397
|
-
mem = int(gpu.memoryTotal / 1000) # in GBs
|
398
|
-
gpus.append(f"{name}-{mem}GB")
|
399
|
-
return ",".join(gpus)
|
400
|
-
|
401
|
-
def system_uptick_request(username, node_name, backend_endpoint, backend_api_key, local_version=0):
|
402
|
-
gpus = get_gpus()
|
403
|
-
data = {
|
404
|
-
"username": username,
|
405
|
-
"system_info": {
|
406
|
-
"os": platform.system(),
|
407
|
-
"cpu_count": os.cpu_count(),
|
408
|
-
"cpu": platform.processor(),
|
409
|
-
"platform": platform.platform(),
|
410
|
-
"ram": round(psutil.virtual_memory().total / (1024.0 **3)),
|
411
|
-
"hostname": node_name,
|
412
|
-
"gpus": gpus
|
413
|
-
},
|
414
|
-
"version": local_version
|
415
|
-
}
|
416
|
-
|
417
|
-
response = requests.post(
|
418
|
-
url=urljoin(backend_endpoint, "/uptick"),
|
419
|
-
json=data,
|
420
|
-
headers={'X-API-KEY': backend_api_key}
|
421
|
-
)
|
422
|
-
response.raise_for_status()
|
423
|
-
return response.json()
|
424
|
-
|
425
386
|
def resource_path(relative_path: str):
|
426
387
|
""" Get absolute path to resource """
|
427
388
|
try:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "kalavai-client"
|
3
|
-
version = "0.5.
|
3
|
+
version = "0.5.6"
|
4
4
|
authors = [
|
5
5
|
{name = "Carlos Fernandez Musoles", email = "carlos@kalavai.net"}
|
6
6
|
]
|
@@ -20,9 +20,8 @@ dependencies = [
|
|
20
20
|
"pyyaml==6.0.2",
|
21
21
|
"rich==13.7.1",
|
22
22
|
"arguably>=1.2.5",
|
23
|
-
"gputil==1.4.0",
|
24
23
|
"Pillow==10.3.0",
|
25
|
-
"setuptools
|
24
|
+
"setuptools>70.0.0",
|
26
25
|
"netifaces==0.11.0",
|
27
26
|
"anvil-uplink==0.5.1",
|
28
27
|
"importlib_resources==6.5.2"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/docker-compose-template.yaml
RENAMED
File without changes
|
{kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/pool_config_template.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
{kalavai_client-0.5.4 → kalavai_client-0.5.6}/kalavai_client/assets/user_workspace_values.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|