Skip to content
Merged
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
6 changes: 6 additions & 0 deletions instill/helpers/ray_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def __init__(self, deployable: Deployment) -> None:
num_of_cpus = os.getenv(ENV_NUM_OF_CPUS)
if num_of_cpus is not None and num_of_cpus != "":
self.update_num_cpus(float(num_of_cpus))
else:
self.update_num_cpus(1)

memory = os.getenv(ENV_MEMORY)
if memory is not None and memory != "":
Expand All @@ -48,10 +50,14 @@ def __init__(self, deployable: Deployment) -> None:
num_of_min_replicas = os.getenv(ENV_NUM_OF_MIN_REPLICAS)
if num_of_min_replicas is not None and num_of_min_replicas != "":
self.update_min_replicas(int(num_of_min_replicas))
else:
self.update_min_replicas(0)

num_of_max_replicas = os.getenv(ENV_NUM_OF_MAX_REPLICAS)
if num_of_max_replicas is not None and num_of_max_replicas != "":
self.update_max_replicas(int(num_of_max_replicas))
else:
self.update_max_replicas(1)

vram = os.getenv(ENV_TOTAL_VRAM)
if vram is not None and vram != "":
Expand Down