[Misc] Use ray[adag] dependency instead of cuda (#7938)
This commit is contained in:
parent
e5cab71531
commit
de80783b69
@ -37,7 +37,6 @@ WORKDIR /workspace
|
|||||||
|
|
||||||
# install build and runtime dependencies
|
# install build and runtime dependencies
|
||||||
COPY requirements-common.txt requirements-common.txt
|
COPY requirements-common.txt requirements-common.txt
|
||||||
COPY requirements-adag.txt requirements-adag.txt
|
|
||||||
COPY requirements-cuda.txt requirements-cuda.txt
|
COPY requirements-cuda.txt requirements-cuda.txt
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
python3 -m pip install -r requirements-cuda.txt
|
python3 -m pip install -r requirements-cuda.txt
|
||||||
@ -66,7 +65,6 @@ COPY setup.py setup.py
|
|||||||
COPY cmake cmake
|
COPY cmake cmake
|
||||||
COPY CMakeLists.txt CMakeLists.txt
|
COPY CMakeLists.txt CMakeLists.txt
|
||||||
COPY requirements-common.txt requirements-common.txt
|
COPY requirements-common.txt requirements-common.txt
|
||||||
COPY requirements-adag.txt requirements-adag.txt
|
|
||||||
COPY requirements-cuda.txt requirements-cuda.txt
|
COPY requirements-cuda.txt requirements-cuda.txt
|
||||||
COPY pyproject.toml pyproject.toml
|
COPY pyproject.toml pyproject.toml
|
||||||
COPY vllm vllm
|
COPY vllm vllm
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
include LICENSE
|
include LICENSE
|
||||||
include requirements-adag.txt
|
|
||||||
include requirements-common.txt
|
include requirements-common.txt
|
||||||
include requirements-cuda.txt
|
include requirements-cuda.txt
|
||||||
include requirements-rocm.txt
|
include requirements-rocm.txt
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
# Dependencies for Ray accelerated DAG
|
|
||||||
cupy-cuda12x
|
|
||||||
ray >= 2.32
|
|
||||||
@ -1,6 +1,3 @@
|
|||||||
# Needed for Ray accelerated DAG tests
|
|
||||||
-r requirements-adag.txt
|
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
pytest
|
pytest
|
||||||
tensorizer>=2.9.0
|
tensorizer>=2.9.0
|
||||||
@ -16,7 +13,7 @@ httpx
|
|||||||
librosa # required for audio test
|
librosa # required for audio test
|
||||||
peft
|
peft
|
||||||
requests
|
requests
|
||||||
ray
|
ray[adag]>=2.35
|
||||||
sentence-transformers # required for embedding
|
sentence-transformers # required for embedding
|
||||||
soundfile # required for audio test
|
soundfile # required for audio test
|
||||||
compressed-tensors==0.4.0 # required for compressed-tensors
|
compressed-tensors==0.4.0 # required for compressed-tensors
|
||||||
|
|||||||
@ -427,18 +427,34 @@ class RayGPUExecutor(DistributedGPUExecutor):
|
|||||||
async_run_remote_workers_only to complete."""
|
async_run_remote_workers_only to complete."""
|
||||||
ray.get(parallel_worker_tasks)
|
ray.get(parallel_worker_tasks)
|
||||||
|
|
||||||
def _compiled_ray_dag(self, enable_asyncio: bool):
|
def _check_ray_adag_installation(self):
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from packaging import version
|
from packaging import version
|
||||||
|
|
||||||
required_version = version.parse("2.32")
|
required_version = version.parse("2.35")
|
||||||
current_version = version.parse(
|
current_version = version.parse(
|
||||||
pkg_resources.get_distribution("ray").version)
|
pkg_resources.get_distribution("ray").version)
|
||||||
if current_version < required_version:
|
if current_version < required_version:
|
||||||
raise ValueError(f"Ray version {required_version} or greater is "
|
raise ValueError(f"Ray version {required_version} or greater is "
|
||||||
f"required, but found {current_version}")
|
f"required, but found {current_version}")
|
||||||
|
|
||||||
|
import importlib.util
|
||||||
|
adag_spec = importlib.util.find_spec(
|
||||||
|
"ray.experimental.compiled_dag_ref")
|
||||||
|
if adag_spec is None:
|
||||||
|
raise ValueError("Ray accelerated DAG is not installed. "
|
||||||
|
"Run `pip install ray[adag]` to install it.")
|
||||||
|
|
||||||
|
cupy_spec = importlib.util.find_spec("cupy")
|
||||||
|
if cupy_spec is None and envs.VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL:
|
||||||
|
raise ValueError(
|
||||||
|
"cupy is not installed but required since "
|
||||||
|
"VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL is set."
|
||||||
|
"Run `pip install ray[adag]` and check cupy installation.")
|
||||||
|
|
||||||
|
def _compiled_ray_dag(self, enable_asyncio: bool):
|
||||||
assert self.parallel_config.use_ray
|
assert self.parallel_config.use_ray
|
||||||
|
self._check_ray_adag_installation()
|
||||||
from ray.dag import InputNode, MultiOutputNode
|
from ray.dag import InputNode, MultiOutputNode
|
||||||
from ray.experimental.channel.torch_tensor_type import TorchTensorType
|
from ray.experimental.channel.torch_tensor_type import TorchTensorType
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user