kalavai-client 0.6.18__py3-none-any.whl → 0.6.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
 
2
- __version__ = "0.6.18"
2
+ __version__ = "0.6.19"
@@ -1,7 +1,7 @@
1
1
  services:
2
2
  kalavai_gui:
3
3
  container_name: kalavai_gui
4
- image: bundenth/kalavai-gui:latest
4
+ image: bundenth/kalavai-gui:{{gui_version}}
5
5
  platform: linux/amd64
6
6
  extra_hosts:
7
7
  - "host.docker.internal:host-gateway"
kalavai_client/cli.py CHANGED
@@ -58,7 +58,8 @@ from kalavai_client.core import (
58
58
  stop_pool,
59
59
  uncordon_nodes,
60
60
  TokenType,
61
- unregister_pool
61
+ unregister_pool,
62
+ update_pool
62
63
  )
63
64
  from kalavai_client.utils import (
64
65
  check_gpu_drivers,
@@ -208,7 +209,8 @@ def input_gpus(non_interactive=False):
208
209
  def gui__start(
209
210
  *others,
210
211
  log_level="critical",
211
- backend_only=False
212
+ backend_only=False,
213
+ version="latest"
212
214
  ):
213
215
  """Run GUI (docker) and kalavai core backend (api)"""
214
216
  ports_needed = 1 if backend_only else 3
@@ -242,7 +244,8 @@ def gui__start(
242
244
  "gui_backend_port": ports[2],
243
245
  "bridge_port": ports[0],
244
246
  "path": user_path("", create_path=True),
245
- "protected_access": user_key
247
+ "protected_access": user_key,
248
+ "gui_version": version
246
249
  }
247
250
  compose_yaml = load_template(
248
251
  template_path=DOCKER_COMPOSE_GUI,
@@ -679,23 +682,12 @@ def pool__update(*others):
679
682
  """
680
683
  Update kalavai pool
681
684
  """
682
- try:
683
- CLUSTER.validate_cluster()
684
- except Exception as e:
685
- console.log(f"[red]Problems with your pool: {str(e)}")
686
- return
687
-
688
- if not CLUSTER.is_seed_node():
689
- console.log("You can only update a pool from the seed node.")
690
- return
691
-
692
- # update dependencies
693
- try:
694
- CLUSTER.update_dependencies(debug=True)
695
- console.log("Pool updating. Expect some downtime on core services")
696
- except Exception as e:
697
- console.log(f"[red]Error when updating pool: {str(e)}")
698
- return
685
+ result = update_pool(debug=True)
686
+
687
+ if "error" in result:
688
+ console.log(f"[red]{result['error']}")
689
+ else:
690
+ console.log(f"[green]{result}")
699
691
 
700
692
 
701
693
  @arguably.command
kalavai_client/core.py CHANGED
@@ -39,6 +39,7 @@ from kalavai_client.utils import (
39
39
  CLUSTER_IP_KEY,
40
40
  CLUSTER_NAME_KEY,
41
41
  AUTH_KEY,
42
+ USER_ID_KEY,
42
43
  WATCHER_SERVICE_KEY,
43
44
  CLUSTER_TOKEN_KEY,
44
45
  READONLY_AUTH_KEY,
@@ -809,6 +810,7 @@ def create_pool(
809
810
  values = {
810
811
  CLUSTER_NAME_KEY: cluster_name,
811
812
  CLUSTER_IP_KEY: ip_address,
813
+ USER_ID_KEY: user_id if user_id is not None else "",
812
814
  AUTH_KEY: auth_key,
813
815
  READONLY_AUTH_KEY: readonly_auth_key,
814
816
  WRITE_AUTH_KEY: write_auth_key,
@@ -884,6 +886,22 @@ def create_pool(
884
886
 
885
887
  return {"success"}
886
888
 
889
+ def update_pool(debug=True):
890
+ try:
891
+ CLUSTER.validate_cluster()
892
+ except Exception as e:
893
+ return {"error": f"Problems with your pool: {str(e)}"}
894
+
895
+ if not CLUSTER.is_seed_node():
896
+ return {"error": "You can only update a pool from the seed node."}
897
+
898
+ # update dependencies
899
+ try:
900
+ CLUSTER.update_dependencies(debug=debug)
901
+ return {"success": "Pool updating. Expect some downtime on core services"}
902
+ except Exception as e:
903
+ return {"error": f"[red]Error when updating pool: {str(e)}"}
904
+
887
905
 
888
906
  def get_pool_token(mode: TokenType):
889
907
 
kalavai_client/utils.py CHANGED
@@ -36,6 +36,7 @@ NODE_NAME_KEY = "node_name"
36
36
  PUBLIC_LOCATION_KEY = "public_location"
37
37
  CLUSTER_NAME_KEY = "cluster_name"
38
38
  AUTH_KEY = "watcher_admin_key"
39
+ USER_ID_KEY = "kalavai_user_id"
39
40
  WRITE_AUTH_KEY = "watcher_write_key"
40
41
  ALLOW_UNREGISTERED_USER_KEY = "watcher_allow_unregistered_user"
41
42
  NODE_ROLE_LABEL = "kalavai.node_role"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kalavai-client
3
- Version: 0.6.18
3
+ Version: 0.6.19
4
4
  Summary: Client app for kalavai platform
5
5
  License: Apache-2.0
6
6
  Keywords: LLM,platform
@@ -1,9 +1,9 @@
1
- kalavai_client/__init__.py,sha256=ErdtY8HWYl_n6MmTR8hlH878NUP9glayQd1egl02vKY,23
1
+ kalavai_client/__init__.py,sha256=29RPUdF-Jn8Tqqu5Mk5Ci4E0On_MZIVUBqNZv5nyu0s,23
2
2
  kalavai_client/__main__.py,sha256=WQUfxvRsBJH5gsCJg8pLz95QnZIj7Ol8psTO77m0QE0,73
3
3
  kalavai_client/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  kalavai_client/assets/apps.yaml,sha256=17JuXSv-Qj5Az6ZTRyiEaQXVbI325uTrZzKk2irts2g,6410
5
5
  kalavai_client/assets/apps_values.yaml,sha256=LeSNd3PwkIx0wkTIlEk2KNz3Yy4sXSaHALQEkopdhKE,2165
6
- kalavai_client/assets/docker-compose-gui.yaml,sha256=shqN78YLw0QP7bqTKveI4ppz5E-5b1JowmsSB4OG3nA,778
6
+ kalavai_client/assets/docker-compose-gui.yaml,sha256=OAVO0ohaCpDB9FGeih0yAbVNwUfDtaCzssZ25uiuJyA,787
7
7
  kalavai_client/assets/docker-compose-template.yaml,sha256=KHIwJ2WWX7Y7wQKiXRr82Jqd3IKRyls5zhTyl8mSmrc,1805
8
8
  kalavai_client/assets/nginx.conf,sha256=drVVCg8GHucz7hmt_BI6giAhK92OV71257NTs3LthwM,225
9
9
  kalavai_client/assets/pool_config_template.yaml,sha256=MhBZQsEMKrBgbUVSKgIGmXWhybeGKG6l5XvJb38y5GI,577
@@ -13,13 +13,13 @@ kalavai_client/assets/user_workspace_values.yaml,sha256=G0HOzQUxrDMCwuW9kbWUZaKM
13
13
  kalavai_client/auth.py,sha256=EB3PMvKUn5_KAQkezkEHEt-OMZXyfkZguIQlUFkEHcA,3243
14
14
  kalavai_client/bridge_api.py,sha256=Hd7whTX2TAiNYX1G237hv2rqtKUBGRJkzUoWOMZm44A,25562
15
15
  kalavai_client/bridge_models.py,sha256=3mHCqIHVysLLkQvGT-DKqKOrtAlQSfEOdrwSq2yTRRU,2439
16
- kalavai_client/cli.py,sha256=SzKG7_ZG0ehMQsECQRWSvqj2Fju2Gd5O7uBa60bFBAY,47830
16
+ kalavai_client/cli.py,sha256=UC2aRUvNI53Xq-ubyoKDoVaRS1VDRmKtU9sVMf9C5Sg,47522
17
17
  kalavai_client/cluster.py,sha256=Z2PIXbZuSAv9xmw-MyZP1M41BpVMpirLzG51bqGA-zc,13548
18
- kalavai_client/core.py,sha256=weg54lc03gp2qGwEXl90XEnXGdwFFlaTqZjxyKsngj4,34765
18
+ kalavai_client/core.py,sha256=haNLna0TWzxmGx9cEhJjnV3r9YSOS3Fhtr4dt70LnwQ,35390
19
19
  kalavai_client/env.py,sha256=YsfZj7LWf6ABquDsoIFFkXCFYwenpDk8zVnGsf7qv98,2823
20
- kalavai_client/utils.py,sha256=GeX1rKUdlQoOW_K2relER8jRQEN1M0UdhsLKOkv5D_g,13428
21
- kalavai_client-0.6.18.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
- kalavai_client-0.6.18.dist-info/METADATA,sha256=nCvnC5f8QM1sHV4wk3HI9YjH0c_vkpOIkcVpMFIKEx0,12393
23
- kalavai_client-0.6.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
24
- kalavai_client-0.6.18.dist-info/entry_points.txt,sha256=9T6D45gxwzfVbglMm1r6XPdXuuZdHfy_7fCeu2jUphc,50
25
- kalavai_client-0.6.18.dist-info/RECORD,,
20
+ kalavai_client/utils.py,sha256=5cUpMVsADF3JdDW0wbu-f38MURkhQz9pPngg0WxssJw,13460
21
+ kalavai_client-0.6.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ kalavai_client-0.6.19.dist-info/METADATA,sha256=CYVNusQKxd6KHa0UCx3QBDytEXGApHg2OrZd7O5LfIU,12393
23
+ kalavai_client-0.6.19.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
24
+ kalavai_client-0.6.19.dist-info/entry_points.txt,sha256=9T6D45gxwzfVbglMm1r6XPdXuuZdHfy_7fCeu2jUphc,50
25
+ kalavai_client-0.6.19.dist-info/RECORD,,