Skip to content

Commit

Permalink
rebase patches; update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Nov 8, 2022
1 parent 60f0934 commit 8185032
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 55 deletions.
19 changes: 7 additions & 12 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,14 @@ outputs:
- attrs
- click >=7.0, <=8.0.4
- colorama
- dataclasses # [py<37]
- filelock
- frozenlist
# We override the 1.43.0 upper-bound in setup.py here,
# see https://github.com/ray-project/ray/issues/28354
- grpcio >=1.32.0,<1.48
- grpcio >=1.32.0
- jsonschema
- msgpack-python >=1.0.0, <2.0.0
- numpy >=1.20
- pickle5 # [py<38]
- protobuf >=3.15.3, <4.0.0
- protobuf >=3.15.3
- psutil
- pyyaml
- redis-py >=3.5.0 # [win]
Expand Down Expand Up @@ -118,9 +115,9 @@ outputs:
- {{ pin_subpackage('ray-core', exact=True) }}
- aiohttp >=3.7
- aiohttp-cors
- aioredis <2
- aioredis
- colorful
- gpustat
- gpustat >=1.0.0
- opencensus
- prometheus_client >=0.7.1, <0.14.0
- pydantic
Expand Down Expand Up @@ -184,10 +181,8 @@ outputs:
run:
- python
- {{ pin_subpackage('ray-core', exact=True) }}
- numpy >=1.19 # [py<37]
- numpy >=1.20 # [py>=37]
- pandas >=1.0.5 # [py<37]
- pandas >=1.3 # [py>=37]
- numpy
- pandas >=1.3
- pyarrow >=6.0.1, <7.0.0
- fsspec
test:
Expand Down Expand Up @@ -231,7 +226,7 @@ outputs:
run:
- python
- {{ pin_subpackage('ray-core', exact=True) }}
- uvicorn =0.16.0
- uvicorn
- requests
- starlette
- fastapi
Expand Down
25 changes: 12 additions & 13 deletions recipe/patches/0001-Redis-deps-now-build-but-do-not-link.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f128a947e04cf909dcf420e9554f0ac42dd21829 Mon Sep 17 00:00:00 2001
From def926ffdcac119f4c678914a85e699f51822c4c Mon Sep 17 00:00:00 2001
From: Vasily Litvinov <vasilij.n.litvinov@intel.com>
Date: Fri, 3 Dec 2021 10:46:36 -0800
Subject: [PATCH 1/5] Redis deps now build but do not link
Expand All @@ -14,13 +14,13 @@ Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
create mode 100644 thirdparty/patches/redis-deps-ar.patch

diff --git a/bazel/BUILD.redis b/bazel/BUILD.redis
index f488d607f..234d72e68 100644
index 9edccf578..60e070028 100644
--- a/bazel/BUILD.redis
+++ b/bazel/BUILD.redis
@@ -14,13 +14,17 @@ genrule(
"redis-cli",
],
cmd = """
@@ -42,13 +42,17 @@ make(

genrule_cmd = select({
"@bazel_tools//src/conditions:darwin": """
- unset CC LDFLAGS CXX CXXFLAGS
+ export CC=$(CC)
+ export CFLAGS=$(CC_FLAGS)
Expand All @@ -37,9 +37,9 @@ index f488d607f..234d72e68 100644
mv "$${tmpdir}"/src/redis-server $(location redis-server)
chmod +x $(location redis-server)
mv "$${tmpdir}"/src/redis-cli $(location redis-cli)
@@ -28,6 +32,11 @@ genrule(
rm -r -f -- "$${tmpdir}"
""",
@@ -76,5 +80,10 @@ genrule(
],
cmd = genrule_cmd,
visibility = ["//visibility:public"],
+ toolchains = [
+ "@bazel_tools//tools/cpp:current_cc_toolchain",
Expand All @@ -48,19 +48,18 @@ index f488d607f..234d72e68 100644
+ ],
tags = ["local"],
)

diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl
index b5c1beb54..f2b372fcc 100644
index fd844d66d..64799185c 100644
--- a/bazel/ray_deps_setup.bzl
+++ b/bazel/ray_deps_setup.bzl
@@ -102,6 +102,7 @@ def ray_deps_setup():
@@ -103,6 +103,7 @@ def ray_deps_setup():
sha256 = "40827fcaf188456ad9b3be8e27a4f403c43672b6bb6201192dc15756af6f1eae",
patches = [
"@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch",
+ "@com_github_ray_project_ray//thirdparty/patches:redis-deps-ar.patch",
],
workspace_file_content = 'workspace(name = "com_github_antirez_redis")'
)

diff --git a/thirdparty/patches/redis-deps-ar.patch b/thirdparty/patches/redis-deps-ar.patch
new file mode 100644
index 000000000..f778e26f4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0edf37e8d75ffeeeef2ccd75a91b57421abfe82a Mon Sep 17 00:00:00 2001
From 3aa3629ce4eb95001401b3b9a81ac896f7258b1c Mon Sep 17 00:00:00 2001
From: Vasily Litvinov <vasilij.n.litvinov@intel.com>
Date: Tue, 10 Nov 2020 23:26:35 +0300
Subject: [PATCH 2/5] Disable making non-core entry scripts
Expand All @@ -8,10 +8,10 @@ Subject: [PATCH 2/5] Disable making non-core entry scripts
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index df3e1a62d..2d70a80e4 100644
index 15d6d7a8a..1b8c8e156 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -771,10 +771,10 @@ setuptools.setup(
@@ -777,10 +777,10 @@ setuptools.setup(
entry_points={
"console_scripts": [
"ray=ray.scripts.scripts:main",
Expand Down
39 changes: 17 additions & 22 deletions recipe/patches/0003-Remove-all-dependencies-from-setup.py.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From 6fa5f3ca104a9eb34eb95c4ee61fa73cd94c848c Mon Sep 17 00:00:00 2001
From c8e20362db9b76134ee1657635e34d97d2df75ca Mon Sep 17 00:00:00 2001
From: Kai Fricke <kai@anyscale.com>
Date: Fri, 3 Dec 2021 10:55:23 -0800
Subject: [PATCH 3/5] Remove all dependencies from setup.py

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Matti Picus <matti.picus@gmail.com>
---
python/setup.py | 85 ++++++-------------------------------------------
1 file changed, 9 insertions(+), 76 deletions(-)
python/setup.py | 80 ++++++-------------------------------------------
1 file changed, 9 insertions(+), 71 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index 2d70a80e4..a21d6d3b2 100644
index 1b8c8e156..c6ee62a96 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -204,49 +204,13 @@ ray_files += [
@@ -211,43 +211,13 @@ ray_files += [
# also update the matching section of requirements/requirements.txt
# in this directory
if setup_spec.type == SetupType.RAY:
Expand All @@ -40,19 +40,13 @@ index 2d70a80e4..a21d6d3b2 100644
- "colorful",
- "py-spy >= 0.2.0",
- "requests",
- "gpustat >= 1.0.0b1", # for windows
- "gpustat >= 1.0.0", # for windows
- "opencensus",
- "pydantic",
- "prometheus_client >= 0.7.1, < 0.14.0",
- "smart_open",
- ],
- "serve": [
- "uvicorn==0.16.0",
- "requests",
- "starlette",
- "fastapi",
- "aiorwlock",
- ],
- "serve": ["uvicorn", "requests", "starlette", "fastapi", "aiorwlock"],
- "tune": ["pandas", "tabulate", "tensorboardX>=1.9", "requests"],
- "k8s": ["kubernetes", "urllib3"],
- "observability": [
Expand All @@ -69,7 +63,7 @@ index 2d70a80e4..a21d6d3b2 100644
}

# Ray Serve depends on the Ray dashboard components.
@@ -260,18 +224,7 @@ if setup_spec.type == SetupType.RAY:
@@ -261,18 +231,7 @@ if setup_spec.type == SetupType.RAY:
if sys.version_info >= (3, 7, 0):
setup_spec.extras["k8s"].append("kopf")

Expand All @@ -89,36 +83,37 @@ index 2d70a80e4..a21d6d3b2 100644
setup_spec.extras["train"] = setup_spec.extras["tune"]

# Ray AI Runtime should encompass Data, Tune, and Serve.
@@ -292,27 +245,7 @@ if setup_spec.type == SetupType.RAY:
# should be carefully curated. If you change it, please reflect
# the change in the matching section of requirements/requirements.txt
@@ -297,28 +256,7 @@ if setup_spec.type == SetupType.RAY:
# install-core-prerelease-dependencies.sh so we can test
# new releases candidates.
if setup_spec.type == SetupType.RAY:
- setup_spec.install_requires = [
- "attrs",
- "click >= 7.0, <= 8.0.4",
- "dataclasses; python_version < '3.7'",
- "filelock",
- "grpcio >= 1.32.0, <= 1.43.0; python_version < '3.10'",
- "grpcio >= 1.42.0, <= 1.43.0; python_version >= '3.10'",
- "grpcio >= 1.32.0; python_version < '3.10'",
- "grpcio >= 1.42.0; python_version >= '3.10'",
- "jsonschema",
- "msgpack >= 1.0.0, < 2.0.0",
- "numpy >= 1.16; python_version < '3.9'",
- "numpy >= 1.19.3; python_version >= '3.9'",
- "protobuf >= 3.15.3, < 4.0.0",
- "packaging; python_version >= '3.10'",
- "protobuf >= 3.15.3, != 3.19.5",
- "pyyaml",
- "aiosignal",
- "frozenlist",
- "requests",
- # Light weight requirement, can be replaced with "typing" once
- # we deprecate Python 3.7 (this will take a while).
- "typing_extensions; python_version < '3.8'",
- "virtualenv", # For pip runtime env.
- "virtualenv>=20.0.24", # For pip runtime env.
- ]
+ setup_spec.install_requires = []


def is_native_windows_or_msys():
@@ -766,7 +699,7 @@ setuptools.setup(
@@ -772,7 +710,7 @@ setuptools.setup(
# The BinaryDistribution argument triggers build_ext.
distclass=BinaryDistribution,
install_requires=setup_spec.install_requires,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e083a690e2f602b8d5061cf0409247beca3a5c5f Mon Sep 17 00:00:00 2001
From 7dd66d73a8fd1066eff55bb3a9369f461fe20f64 Mon Sep 17 00:00:00 2001
From: Vasily Litvinov <vasilij.n.litvinov@intel.com>
Date: Fri, 3 Dec 2021 10:59:10 -0800
Subject: [PATCH 4/5] Ignore warnings in event.cc and logging.cc
Expand All @@ -10,7 +10,7 @@ Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
1 file changed, 3 insertions(+)

diff --git a/.bazelrc b/.bazelrc
index 1c2c7ec0d..141b8f88a 100644
index dff96cc97..c2121f644 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -41,6 +41,9 @@ build:clang-cl --per_file_copt="-\\.(asm|S)$@-Werror"
Expand Down
6 changes: 3 additions & 3 deletions recipe/patches/0005-Add-bazel-linkopts-libs.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4d6b848a1a089d642c1c0a705b676b042bd9507b Mon Sep 17 00:00:00 2001
From cc7ed1a82240b750eb6f8e4acefce402c1e05ce9 Mon Sep 17 00:00:00 2001
From: Kai Fricke <kai@anyscale.com>
Date: Fri, 3 Dec 2021 11:04:33 -0800
Subject: [PATCH 5/5] Add bazel linkopts/libs
Expand All @@ -9,10 +9,10 @@ Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
1 file changed, 2 insertions(+)

diff --git a/python/setup.py b/python/setup.py
index a21d6d3b2..4aa7110dd 100644
index c6ee62a96..c5e4f839e 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -423,6 +423,8 @@ def build(build_python, build_java, build_cpp):
@@ -434,6 +434,8 @@ def build(build_python, build_java, build_cpp):
raise OSError(msg)

bazel_env = dict(os.environ, PYTHON3_BIN_PATH=sys.executable)
Expand Down

0 comments on commit 8185032

Please sign in to comment.