Skip to content

Commit

Permalink
Make Ray optional, do not install by default with kind
Browse files Browse the repository at this point in the history
  • Loading branch information
pbchekin committed Jan 11, 2025
1 parent f37623e commit ec39f6b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 0 additions & 2 deletions docs/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,5 @@ Note that the proxy is only used by the script itself, it is not used in the clu
# On control node execute
export ICL_INGRESS_DOMAIN={ingress_domain}
# Ray client endpoint is not currently supported on GKE
export ICL_DISABLE_RAY_TEST=1
./scripts/ccn/test.sh
```
1 change: 1 addition & 0 deletions terraform/icl/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module "prefect" {
}

module "ray" {
count = var.ray_enabled ? 1 : 0
source = "../modules/ray"
depends_on = [module.shared-volume]
namespace_labels = var.namespace_labels
Expand Down
6 changes: 6 additions & 0 deletions terraform/icl/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ variable "prefect_api_url" {
type = string
}

variable "ray_enabled" {
description = "Enable Ray"
type = bool
default = false
}

variable "ray_image" {
description = "Full tag for Ray Docker image"
default = "pbchekin/icl-ray:2.9.2-py39"
Expand Down
7 changes: 2 additions & 5 deletions tests/smoke/test_ray.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import time
from os import getenv

import pytest
import ray
from pytest import mark


def ray_init(address, retries=10, retry_delay=30):
Expand All @@ -25,10 +25,7 @@ def f(x):
return x * x


@mark.skipif(
getenv("ICL_DISABLE_RAY_TEST") is not None,
reason="Ray test is disabled by setting ICL_DISABLE_RAY_TEST",
)
@pytest.mark.skip(reason='Ray disabled')
def test_ray(ray_endpoint):
ray_init(address=f'ray://{ray_endpoint}')
living_nodes = [node for node in ray.nodes() if node.get('alive')]
Expand Down

0 comments on commit ec39f6b

Please sign in to comment.