diff --git a/tests/conftest.py b/tests/conftest.py index af9260d70..7d4df0858 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -235,6 +235,8 @@ def event_loop(): from tests.fixtures.on_demand_cluster_fixtures import ( a10g_gpu_cluster, # noqa: F401 + den_launched_ondemand_aws_docker_cluster, # noqa: F401 + den_launcher_v100_gpu_cluster, # noqa: F401 k80_gpu_cluster, # noqa: F401 multinode_cpu_docker_conda_cluster, # noqa: F401 multinode_gpu_cluster, # noqa: F401 diff --git a/tests/fixtures/on_demand_cluster_fixtures.py b/tests/fixtures/on_demand_cluster_fixtures.py index 39e94c352..c321cba2b 100644 --- a/tests/fixtures/on_demand_cluster_fixtures.py +++ b/tests/fixtures/on_demand_cluster_fixtures.py @@ -5,6 +5,7 @@ import runhouse as rh from runhouse.constants import DEFAULT_HTTPS_PORT +from runhouse.resources.hardware.utils import LauncherType from runhouse.resources.images.image import Image from tests.conftest import init_args @@ -35,14 +36,26 @@ def setup_test_cluster(args, request, create_env=False): @pytest.fixture( params=[ "ondemand_aws_docker_cluster", + "den_launched_ondemand_aws_docker_cluster", "ondemand_gcp_cluster", "ondemand_k8s_cluster", "ondemand_k8s_docker_cluster", "v100_gpu_cluster", + "den_launcher_v100_gpu_cluster", "k80_gpu_cluster", "a10g_gpu_cluster", ], - ids=["aws_cpu", "gcp_cpu", "k8s_cpu", "k8s_docker_cpu", "v100", "k80", "a10g"], + ids=[ + "aws_cpu", + "aws_gpu_den_launcher", + "gcp_cpu", + "k8s_cpu", + "k8s_docker_cpu", + "v100", + "v100_den_launcher", + "k80", + "a10g", + ], ) def ondemand_cluster(request): return request.getfixturevalue(request.param) @@ -66,6 +79,25 @@ def ondemand_aws_docker_cluster(request): return cluster +@pytest.fixture(scope="session") +def den_launched_ondemand_aws_docker_cluster(request): + """ + Note: Also used to test docker and default env with alternate Ray version. + """ + args = { + "name": "aws-cpu", + "instance_type": "CPU:2+", + "provider": "aws", + "image_id": "docker:rayproject/ray:latest-py311-cpu", + "region": "us-east-2", + "image": Image(name="default_image").install_reqs(["ray==2.30.0"]), + "sky_kwargs": {"launch": {"retry_until_up": True}}, + "launcher_type": LauncherType.DEN, + } + cluster = setup_test_cluster(args, request, create_env=True) + return cluster + + @pytest.fixture(scope="session") def ondemand_aws_https_cluster_with_auth(request, test_rns_folder): args = { @@ -157,7 +189,19 @@ def v100_gpu_cluster(request): "instance_type": "V100:1", "provider": "aws", } - cluster = setup_test_cluster(args, request) + cluster = setup_test_cluster(args, request, create_env=True) + return cluster + + +@pytest.fixture(scope="session") +def den_launcher_v100_gpu_cluster(request): + args = { + "name": "rh-v100", + "instance_type": "V100:1", + "provider": "aws", + "launcher_type": LauncherType.DEN, + } + cluster = setup_test_cluster(args, request, create_env=True) return cluster diff --git a/tests/test_resources/test_clusters/test_cluster.py b/tests/test_resources/test_clusters/test_cluster.py index 1db6b96d5..21f91bec9 100644 --- a/tests/test_resources/test_clusters/test_cluster.py +++ b/tests/test_resources/test_clusters/test_cluster.py @@ -128,9 +128,7 @@ class TestCluster(tests.test_resources.test_resource.TestResource): } MINIMAL = {"cluster": ["static_cpu_pwd_cluster"]} RELEASE = { - "cluster": [ - "static_cpu_pwd_cluster", - ] + "cluster": ["static_cpu_pwd_cluster", "static_cpu_pwd_cluster_den_launcher"] } MAXIMAL = { "cluster": [ @@ -139,6 +137,7 @@ class TestCluster(tests.test_resources.test_resource.TestResource): "docker_cluster_pwd_ssh_no_auth", "static_cpu_pwd_cluster", "multinode_cpu_docker_conda_cluster", + "static_gpu_pwd_cluster_den_launcher", ] } diff --git a/tests/test_resources/test_clusters/test_on_demand_cluster.py b/tests/test_resources/test_clusters/test_on_demand_cluster.py index 335e86c19..aea31d34f 100644 --- a/tests/test_resources/test_clusters/test_on_demand_cluster.py +++ b/tests/test_resources/test_clusters/test_on_demand_cluster.py @@ -87,6 +87,7 @@ class TestOnDemandCluster(tests.test_resources.test_clusters.test_cluster.TestCl RELEASE = { "cluster": [ "ondemand_aws_docker_cluster", + "den_launched_ondemand_aws_docker_cluster", "ondemand_gcp_cluster", "ondemand_aws_https_cluster_with_auth", "ondemand_k8s_cluster", @@ -101,6 +102,7 @@ class TestOnDemandCluster(tests.test_resources.test_clusters.test_cluster.TestCl "ondemand_k8s_docker_cluster", "ondemand_aws_https_cluster_with_auth", "v100_gpu_cluster", + "den_launcher_v100_gpu_cluster", "k80_gpu_cluster", "a10g_gpu_cluster", "static_cpu_pwd_cluster",