Spaces:
Running
Running
Load Kubernetes config when needed.
Browse files
lynxkite-bio/src/lynxkite_bio/k8s.py
CHANGED
@@ -39,8 +39,6 @@ import httpx
|
|
39 |
from kubernetes import client, config
|
40 |
from kubernetes.client.rest import ApiException
|
41 |
|
42 |
-
config.load_kube_config()
|
43 |
-
|
44 |
|
45 |
def _run(
|
46 |
*,
|
@@ -217,6 +215,7 @@ def needs(
|
|
217 |
def decorator(func):
|
218 |
@functools.wraps(func)
|
219 |
def wrapper(*func_args, **func_kwargs):
|
|
|
220 |
_using(
|
221 |
name=name,
|
222 |
image=image,
|
|
|
39 |
from kubernetes import client, config
|
40 |
from kubernetes.client.rest import ApiException
|
41 |
|
|
|
|
|
42 |
|
43 |
def _run(
|
44 |
*,
|
|
|
215 |
def decorator(func):
|
216 |
@functools.wraps(func)
|
217 |
def wrapper(*func_args, **func_kwargs):
|
218 |
+
config.load_kube_config()
|
219 |
_using(
|
220 |
name=name,
|
221 |
image=image,
|