diff --git a/config/conda_build_config.yaml b/config/conda_build_config.yaml index 824153ce..7dd100e1 100644 --- a/config/conda_build_config.yaml +++ b/config/conda_build_config.yaml @@ -1,4 +1,4 @@ c_compiler_version: - - 8.* #[x86_64] + - 11.2.* #[x86_64] cxx_compiler_version: - - 8.* #[x86_64] + - 11.2.* #[x86_64] diff --git a/recipe/build-core.sh b/recipe/build-core.sh index 72d3e571..8333f766 100644 --- a/recipe/build-core.sh +++ b/recipe/build-core.sh @@ -12,7 +12,7 @@ export SKIP_THIRDPARTY_INSTALL=1 grep -lR ELF build/ | xargs chmod +w # now install the thing so conda could pick it up -"${PYTHON}" setup.py install +"${PYTHON}" setup.py install --single-version-externally-managed --root=/ # now clean everything up so subsequent builds (for potentially # different Python version) do not stumble on some after-effects diff --git a/recipe/build-default.sh b/recipe/build-default.sh new file mode 100644 index 00000000..264e628e --- /dev/null +++ b/recipe/build-default.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -xe + +cd python/ray/dashboard/client +npm install +npm ci +npm run build +# not sure why this seems to get copied on windows but not linux... +mkdir -p $SP_DIR/ray/dashboard/client # [not win] +cp -R ./build $SP_DIR/ray/dashboard/client/build # [not win] + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index feef26c7..030a8bd7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "2.6.3" %} +{% set version = "2.9.2" %} package: name: ray-packages @@ -8,16 +8,18 @@ source: git_url: https://github.com/ray-project/ray git_rev: ray-{{ version }} patches: - - patches/0002-Redis-deps-now-build-but-do-not-link.patch + - patches/0001-add-name-attribute-for-googletest.patch + - patches/0002-patch-redis-for-ar-ranlib.patch + - patches/0007-Update-skylib-commit.patch - patches/0003-Disable-making-non-core-entry-scripts.patch - patches/0004-Remove-all-dependencies-from-setup.py.patch - patches/0005-Ignore-warnings-in-event.cc-and-logging.cc.patch - patches/0006-Add-bazel-linkopts-libs.patch + - patches/0009-fixed-grpc-issue.patch - patches/0010-Use-rules_perl-which-is-fixed-for-ppc.patch - patches/0011-Fixed-compilation-error.patch - - patches/0012-Changed-min-bazel-version-to-5.3.patch - patches/0013-Added-patch-for-rules_python-on-ppc64le.patch #[ppc64le] - - patches/0014-allow-builds-with-root-user.patch #[ppc64le] +# - patches/0014-allow-builds-with-root-user.patch #[ppc64le] build: number: 1 @@ -35,8 +37,8 @@ outputs: - python {{ python }} run: - python {{ python }} + - pydantic {{ pydantic }} - {{ pin_subpackage('ray-air', exact=True) }} - - ray-dashboard =={{ version }}=*_{{ PKG_BUILDNUM }} - {{ pin_subpackage('ray-default', exact=True) }} - {{ pin_subpackage('ray-client', exact=True) }} - {{ pin_subpackage('ray-data', exact=True) }} @@ -110,6 +112,7 @@ outputs: - python {{ python }} run: - python {{ python }} + - fsspec {{ fsspec }} - {{ pin_subpackage('ray-data', exact=True) }} - {{ pin_subpackage('ray-serve', exact=True) }} - {{ pin_subpackage('ray-train', exact=True) }} @@ -119,13 +122,16 @@ outputs: - ray.air - name: ray-default + script: build-default.sh # [not win] requirements: + build: + - nodejs host: + - nodejs - python {{ python }} run: - python {{ python }} - {{ pin_subpackage('ray-core', exact=True) }} - - ray-dashboard =={{ version }}=*_{{ PKG_BUILDNUM }} - aiohttp >=3.7 - aiohttp-cors - colorful @@ -133,13 +139,13 @@ outputs: # skip it there until gpustat is fixed as it is optional - gpustat # [not win] - jsonschema - - requests {{ requests }} - opencensus - prometheus_client >=0.7.1 - requests {{ requests }} - smart_open - py-spy >=0.2.0 - - pydantic + - pydantic {{ pydantic }} + - typing-extensions {{ typing_extensions }} - virtualenv >=20.0.24,<20.21.1 test: @@ -149,30 +155,6 @@ outputs: # init-code seemingly depends on platform or other ambient things; # the following doesn't get triggered in CI, but was a problem in # https://github.com/conda-forge/ray-packages-feedstock/issues/16 - - ray._private.metrics_agent - - - name: ray-dashboard - build: - script: - - cd python/ray/dashboard/client - - npm install - - npm ci - - npm run build - # not sure why this seems to get copied on windows but not linux... - - mkdir -p $SP_DIR/ray/dashboard/client # [not win] - - cp -R ./build $SP_DIR/ray/dashboard/client/build # [not win] - requirements: - build: - - nodejs - host: - - nodejs - - python {{ python }} - run: - - python {{ python }} - - {{ pin_subpackage('ray-core', exact=True) }} - - typing-extensions {{ typing_extensions }} - test: - imports: - ray.dashboard commands: - python -c "import ray; ray.init(include_dashboard=True)" @@ -201,7 +183,7 @@ outputs: - pandas - numpy {{ numpy }} - pyarrow {{ arrow }} - - fsspec + - fsspec {{ fsspec }} test: imports: - ray.data @@ -225,8 +207,13 @@ outputs: - tensorflow-base {{ tensorflow }} - keras {{ keras }} - rich + - openblas {{ openblas }} - typer + - ml_dtypes {{ ml_dtypes }} test: + requires: + - scipy {{ scipy }} + - openblas {{ openblas }} imports: - ray.rllib commands: @@ -245,9 +232,10 @@ outputs: - {{ pin_subpackage('ray-default', exact=True) }} - uvicorn - requests {{ requests }} - - starlette 0.25.0 - - fastapi + - starlette ==0.25.0 + - fastapi ==0.92.0 - aiorwlock + - fsspec {{ fsspec }} test: imports: - ray.serve @@ -262,6 +250,7 @@ outputs: run: - python {{ python }} - {{ pin_subpackage('ray-default', exact=True) }} + - fsspec {{ fsspec }} - pandas - requests {{ requests }} - pyarrow {{ arrow }} @@ -275,6 +264,7 @@ outputs: host: - python run: + - fsspec {{ fsspec }} - python - {{ pin_subpackage('ray-tune', exact=True) }} test: diff --git a/recipe/patches/0001-Do-not-force-pickle5-in-sys.path.patch b/recipe/patches/0001-Do-not-force-pickle5-in-sys.path.patch deleted file mode 100644 index 6b46a612..00000000 --- a/recipe/patches/0001-Do-not-force-pickle5-in-sys.path.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 518e9756bf74c26b8d1acf818b4693f99717e85a Mon Sep 17 00:00:00 2001 -From: Nishidha Panpaliya -Date: Fri, 6 Jan 2023 01:11:43 -0500 -Subject: [PATCH] Do not force pickle5 in sys.path - ---- - python/ray/__init__.py | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/python/ray/__init__.py b/python/ray/__init__.py -index 8aa0247dd..9efbd7dfd 100644 ---- a/python/ray/__init__.py -+++ b/python/ray/__init__.py -@@ -45,15 +45,6 @@ def _configure_system(): - # MUST add pickle5 to the import path because it will be imported by some - # raylet modules. - # -- # When running Python version < 3.8, Ray needs to use pickle5 instead of -- # Python's built-in pickle. Add the directory containing pickle5 to the -- # Python path so that we find the pickle5 version packaged with Ray and -- # not a pre-existing pickle5. -- if sys.version_info < (3, 8): -- pickle5_path = os.path.join( -- os.path.abspath(os.path.dirname(__file__)), "pickle5_files" -- ) -- sys.path.insert(0, pickle5_path) - - # Check that grpc can actually be imported on Apple Silicon. Some package - # managers (such as `pip`) can't properly install the grpcio library yet, --- -2.23.0 - diff --git a/recipe/patches/0001-add-name-attribute-for-googletest.patch b/recipe/patches/0001-add-name-attribute-for-googletest.patch new file mode 100644 index 00000000..0c872817 --- /dev/null +++ b/recipe/patches/0001-add-name-attribute-for-googletest.patch @@ -0,0 +1,24 @@ +From 84b18ff1a2b5c6b83e6763425d428d7a40b4230a Mon Sep 17 00:00:00 2001 +From: ArchanaShinde1 +Date: Wed, 13 Mar 2024 07:06:58 +0000 +Subject: [PATCH] add name attribute for googletest + +--- + bazel/ray_deps_setup.bzl | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index f91eb303c4..25e2d412c1 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -173,6 +173,7 @@ def ray_deps_setup(): + ) + + auto_http_archive( ++ name = "com_google_googletest", + url = "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz", + sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363", + ) +-- +2.40.1 + diff --git a/recipe/patches/0002-Redis-deps-now-build-but-do-not-link.patch b/recipe/patches/0002-Redis-deps-now-build-but-do-not-link.patch deleted file mode 100644 index cd1b3ffc..00000000 --- a/recipe/patches/0002-Redis-deps-now-build-but-do-not-link.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 5872db3888c7fa3f4352464ae9520b7914bc39c3 Mon Sep 17 00:00:00 2001 -From: Vasily Litvinov -Date: Fri, 3 Dec 2021 10:46:36 -0800 -Subject: [PATCH 1/5] Redis deps now build but do not link - -Signed-off-by: Vasily Litvinov -Signed-off-by: Gregory Shimansky -Signed-off-by: Jiajun Yao -Signed-off-by: H. Vetinari ---- - bazel/BUILD.redis | 13 ++- - bazel/ray_deps_setup.bzl | 2 +- - ...01-keep-redis-quiet-and-override-AR.patch} | 79 ++++++++++++++++--- - 3 files changed, 81 insertions(+), 13 deletions(-) - rename thirdparty/patches/{redis-quiet.patch => 0001-keep-redis-quiet-and-override-AR.patch} (53%) - -diff --git a/bazel/BUILD.redis b/bazel/BUILD.redis -index 9edccf5780..60e070028f 100644 ---- a/bazel/BUILD.redis -+++ b/bazel/BUILD.redis -@@ -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) -+ export AR=$${CC/gnu-cc/gnu-ar} -+ export NM=$${CC/gnu-cc/gnu-nm} -+ export RANLIB=$${CC/gnu-cc/gnu-ranlib} - tmpdir="redis.tmp" - p=$(location Makefile) - cp -p -L -R -- "$${p%/*}" "$${tmpdir}" - chmod +x "$${tmpdir}"/deps/jemalloc/configure - parallel="$$(getconf _NPROCESSORS_ONLN || echo 1)" -- make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" -+ make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" AR="$${AR}" RANLIB="$${RANLIB}" - mv "$${tmpdir}"/src/redis-server $(location redis-server) - chmod +x $(location redis-server) - mv "$${tmpdir}"/src/redis-cli $(location redis-cli) -@@ -76,5 +80,10 @@ genrule( - ], - cmd = genrule_cmd, - visibility = ["//visibility:public"], -+ toolchains = [ -+ "@bazel_tools//tools/cpp:current_cc_toolchain", -+ "@bazel_tools//tools/cpp:current_cc_host_toolchain", -+ "@bazel_tools//tools/cpp:cc_flags", -+ ], - tags = ["local"], - ) -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index ce5bd7f23a..33612cfbb4 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -102,7 +102,7 @@ def ray_deps_setup(): - url = "https://github.com/redis/redis/archive/refs/tags/7.0.8.tar.gz", - sha256 = "0e439cbc19f6db5a4c63d355519ab73bf6ac2ecd47df806c14b19564b3d0c593", - patches = [ -- "@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch", -+ "@com_github_ray_project_ray//thirdparty/patches:0001-keep-redis-quiet-and-override-AR.patch", - ], - workspace_file_content = 'workspace(name = "com_github_antirez_redis")' - ) -diff --git a/thirdparty/patches/redis-quiet.patch b/thirdparty/patches/0001-keep-redis-quiet-and-override-AR.patch -similarity index 53% -rename from thirdparty/patches/redis-quiet.patch -rename to thirdparty/patches/0001-keep-redis-quiet-and-override-AR.patch -index d034387596..27c01310ed 100644 ---- a/thirdparty/patches/redis-quiet.patch -+++ b/thirdparty/patches/0001-keep-redis-quiet-and-override-AR.patch -@@ -1,14 +1,45 @@ -+From 10feb7a20122e021efb27d3eebcf55424f3c8d55 Mon Sep 17 00:00:00 2001 -+From: mehrdadn -+Date: Tue, 5 May 2020 10:47:49 -0700 -+Subject: [PATCH] keep redis quiet and override AR -+ -+Patch to keep redis quiet maintained by upstream ray team at -+https://github.com/ray-project/ray/blob/master/thirdparty/patches/redis-quiet.patch -+ -+Extended for conda-forge to enable overriding of AR and RANLIB by: -+ -+Signed-off-by: Vasily Litvinov -+Signed-off-by: Matti Picus -+Signed-off-by: H. Vetinari -+--- -+ deps/Makefile | 20 +++++++++++--------- -+ deps/jemalloc/Makefile.in | 2 +- -+ src/Makefile | 13 ++++++++----- -+ 3 files changed, 20 insertions(+), 15 deletions(-) -+ - diff --git a/deps/Makefile b/deps/Makefile --index 8592e17..0c13eea 100644 -+index 8592e1766..8089693e0 100644 - --- a/deps/Makefile - +++ b/deps/Makefile --@@ -49,19 +49,19 @@ ifeq ($(BUILD_TLS),yes) -+@@ -11,6 +11,10 @@ BINCOLOR="\033[37;1m" -+ MAKECOLOR="\033[32;1m" -+ ENDCOLOR="\033[0m" -+ -++AR=ar -++ARFLAGS=rcu -++RANLIB=ranlib -++ -+ default: -+ @echo "Explicit target required" -+ -+@@ -49,19 +53,19 @@ ifeq ($(BUILD_TLS),yes) - endif - - hiredis: .make-prerequisites - - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) -+- cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) - + #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) -- cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) -++ cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) AR="$(AR)" - - .PHONY: hiredis - -@@ -25,16 +56,22 @@ index 8592e17..0c13eea 100644 - cd hdr_histogram && $(MAKE) - - .PHONY: hdr_histogram --@@ -85,7 +85,7 @@ AR=ar -- ARFLAGS=rc -+@@ -81,12 +85,10 @@ endif -+ # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more -+ # challenging to cross-compile lua (and redis). These defines make it easier -+ # to fit redis into cross-compilation environments, which typically set AR. -+-AR=ar -+-ARFLAGS=rc - - lua: .make-prerequisites - - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) -+- cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" - + #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) -- cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" -++ cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" RANLIB="$(RANLIB)" - - .PHONY: lua --@@ -98,7 +98,7 @@ JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE) -+ -+@@ -98,7 +100,7 @@ JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE) - endif - - jemalloc: .make-prerequisites -@@ -44,7 +81,7 @@ index 8592e17..0c13eea 100644 - cd jemalloc && $(MAKE) CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" lib/libjemalloc.a - - diff --git a/deps/jemalloc/Makefile.in b/deps/jemalloc/Makefile.in --index 7128b00..da8e429 100644 -+index 7128b007e..da8e4299f 100644 - --- a/deps/jemalloc/Makefile.in - +++ b/deps/jemalloc/Makefile.in - @@ -406,7 +406,7 @@ $(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS) -@@ -57,7 +94,7 @@ index 7128b00..da8e429 100644 - $(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O): - @mkdir -p $(@D) - diff --git a/src/Makefile b/src/Makefile --index e4f7d90..704d4b4 100644 -+index e4f7d9068..82b6f7cca 100644 - --- a/src/Makefile - +++ b/src/Makefile - @@ -115,7 +115,7 @@ endif -@@ -69,7 +106,17 @@ index e4f7d90..704d4b4 100644 - FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) - FINAL_LIBS=-lm - DEBUG=-g -ggdb --@@ -326,9 +326,9 @@ REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX) -+@@ -307,6 +307,9 @@ BINCOLOR="\033[37;1m" -+ MAKECOLOR="\033[32;1m" -+ ENDCOLOR="\033[0m" -+ -++AR=ar -++RANLIB=ranlib -++ -+ ifndef V -+ QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; -+ QUIET_GEN = @printf ' %b %b\n' $(CCCOLOR)GEN$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; -+@@ -326,9 +329,9 @@ REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX) - ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ))) - - all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) -@@ -82,3 +129,15 @@ index e4f7d90..704d4b4 100644 - - Makefile.dep: - -$(REDIS_CC) -MM $(ALL_SOURCES) > Makefile.dep 2> /dev/null || true -+@@ -352,7 +355,7 @@ persist-settings: distclean -+ echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings -+ echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings -+ echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings -+- -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS)) -++ -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS) AR="$(AR)" RANLIB="$(RANLIB)") -+ -+ .PHONY: persist-settings -+ -+-- -+2.38.1.windows.1 -+ diff --git a/recipe/patches/0002-patch-redis-for-ar-ranlib.patch b/recipe/patches/0002-patch-redis-for-ar-ranlib.patch new file mode 100644 index 00000000..9d7a0216 --- /dev/null +++ b/recipe/patches/0002-patch-redis-for-ar-ranlib.patch @@ -0,0 +1,131 @@ +From 6b3012200c7ef4ec2a8ffde38bfbb8760cfe9ec4 Mon Sep 17 00:00:00 2001 +From: mattip +Date: Mon, 25 Dec 2023 11:55:35 +0200 +Subject: [PATCH 1/9] patch redis for ar, ranlib + +Signed-off-by: Vasily Litvinov +Signed-off-by: Gregory Shimansky +Signed-off-by: Jiajun Yao +Signed-off-by: H. Vetinari +--- + bazel/BUILD.redis | 8 ++- + bazel/ray_deps_setup.bzl | 1 + + thirdparty/patches/redis-ar-ranlib.patch | 70 ++++++++++++++++++++++++ + 3 files changed, 78 insertions(+), 1 deletion(-) + create mode 100644 thirdparty/patches/redis-ar-ranlib.patch + +diff --git a/bazel/BUILD.redis b/bazel/BUILD.redis +index 9edccf5780..0f62b3aecf 100644 +--- a/bazel/BUILD.redis ++++ b/bazel/BUILD.redis +@@ -43,12 +43,18 @@ make( + genrule_cmd = select({ + "@bazel_tools//src/conditions:darwin": """ + unset CC LDFLAGS CXX CXXFLAGS ++ export CC=$(CONDA_CC) ++ export CFLAGS="$(CONDA_CFLAGS)" ++ export AR=$(CONDA_AR) ++ export NM=$(CONDA_NM) ++ export RANLIB=$(CONDA_RANLIB) ++ export SDKROOT="$(CONDA_SDKROOT)" + tmpdir="redis.tmp" + p=$(location Makefile) + cp -p -L -R -- "$${p%/*}" "$${tmpdir}" + chmod +x "$${tmpdir}"/deps/jemalloc/configure + parallel="$$(getconf _NPROCESSORS_ONLN || echo 1)" +- make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" ++ make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" SDKROOT="$${SDKROOT}" AR="$${AR}" RANLIB="$${RANLIB}" + mv "$${tmpdir}"/src/redis-server $(location redis-server) + chmod +x $(location redis-server) + mv "$${tmpdir}"/src/redis-cli $(location redis-cli) +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index f91eb303c4..0edb960a3b 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -111,6 +111,7 @@ def ray_deps_setup(): + sha256 = "afd656dbc18a886f9a1cc08a550bf5eb89de0d431e713eba3ae243391fb008a6", + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch", ++ "@com_github_ray_project_ray//thirdparty/patches:redis-ar-ranlib.patch", + ], + workspace_file_content = 'workspace(name = "com_github_antirez_redis")' + ) +diff --git a/thirdparty/patches/redis-ar-ranlib.patch b/thirdparty/patches/redis-ar-ranlib.patch +new file mode 100644 +index 0000000000..72a4097cd3 +--- /dev/null ++++ b/thirdparty/patches/redis-ar-ranlib.patch +@@ -0,0 +1,70 @@ ++From 6c4c20e8aca71fde59699977fb82166d0a9a350b Mon Sep 17 00:00:00 2001 ++From: mattip ++Date: Mon, 25 Dec 2023 11:44:34 +0200 ++Subject: [PATCH] Add AR, RANLIB to redis build ++ ++Patch to add AR and RANLIB to redis build ++Signed-off-by: Vasily Litvinov ++Signed-off-by: Matti Picus ++Signed-off-by: H. Vetinari ++--- ++ deps/Makefile | 8 ++++++-- ++ src/Makefile | 5 ++++- ++ 2 files changed, 10 insertions(+), 3 deletions(-) ++ ++diff --git a/deps/Makefile b/deps/Makefile ++index ea5d12cd4..bbdf38ea6 100644 ++--- a/deps/Makefile +++++ b/deps/Makefile ++@@ -12,6 +12,10 @@ BINCOLOR="\033[37;1m" ++ MAKECOLOR="\033[32;1m" ++ ENDCOLOR="\033[0m" ++ +++AR=ar +++ARFLAGS=rcu +++RANLIB=ranlib +++ ++ default: ++ @echo "Explicit target required" ++ ++@@ -52,7 +56,7 @@ endif ++ ++ hiredis: .make-prerequisites ++ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) ++- cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) +++ cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) AR="$(AR)" ++ ++ .PHONY: hiredis ++ ++@@ -99,7 +103,7 @@ ARFLAGS=rc ++ ++ lua: .make-prerequisites ++ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) ++- cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" +++ cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" RANLIB="$(RANLIB)" ++ ++ .PHONY: lua ++ ++diff --git a/src/Makefile b/src/Makefile ++index 737a14777..a724ec0aa 100644 ++--- a/src/Makefile +++++ b/src/Makefile ++@@ -328,6 +328,9 @@ BINCOLOR="\033[37;1m" ++ MAKECOLOR="\033[32;1m" ++ ENDCOLOR="\033[0m" ++ +++AR=ar +++RANLIB=ranlib +++ ++ ifndef V ++ QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; ++ QUIET_GEN = @printf ' %b %b\n' $(CCCOLOR)GEN$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR) 1>&2; ++@@ -381,7 +384,7 @@ persist-settings: distclean ++ echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings ++ echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings ++ echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings ++- -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS)) +++ -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS) AR="$(AR)" RANLIB="$(RANLIB)") ++ ++ .PHONY: persist-settings ++ +-- +2.40.1 + diff --git a/recipe/patches/0004-Remove-all-dependencies-from-setup.py.patch b/recipe/patches/0004-Remove-all-dependencies-from-setup.py.patch index 2fb17b0e..2469aa75 100644 --- a/recipe/patches/0004-Remove-all-dependencies-from-setup.py.patch +++ b/recipe/patches/0004-Remove-all-dependencies-from-setup.py.patch @@ -1,19 +1,17 @@ -From dc32b341c09175ae0e5bf77186d1e1279c533ef8 Mon Sep 17 00:00:00 2001 -From: Kai Fricke -Date: Fri, 3 Dec 2021 10:55:23 -0800 -Subject: [PATCH 5/5] Remove all dependencies from setup.py +From a5a4411a7ad8ca1dcd3ffcb1175340923e289da6 Mon Sep 17 00:00:00 2001 +From: mattip +Date: Mon, 25 Dec 2023 12:13:06 +0200 +Subject: [PATCH 4/7] Remove all dependencies from setup.py -Signed-off-by: Jiajun Yao -Signed-off-by: Matti Picus --- - python/setup.py | 98 ++++--------------------------------------------- - 1 file changed, 8 insertions(+), 90 deletions(-) + python/setup.py | 121 +++++------------------------------------------- + 1 file changed, 12 insertions(+), 109 deletions(-) diff --git a/python/setup.py b/python/setup.py -index affa582097..a26f61f8fb 100644 +index bbf74a8b45..0aa524af1b 100644 --- a/python/setup.py +++ b/python/setup.py -@@ -226,82 +226,18 @@ ray_files += [ +@@ -225,103 +225,18 @@ ray_files += [ # also update the matching section of requirements/requirements.txt # in this directory if setup_spec.type == SetupType.RAY: @@ -40,11 +38,13 @@ index affa582097..a26f61f8fb 100644 - "py-spy >= 0.2.0", - "requests", - "gpustat >= 1.0.0", # for windows +- "grpcio >= 1.32.0; python_version < '3.10'", # noqa:E501 +- "grpcio >= 1.42.0; python_version >= '3.10'", # noqa:E501 - "opencensus", -- "pydantic < 2", # 2.0.0 brings breaking changes +- "pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3", - "prometheus_client >= 0.7.1", - "smart_open", -- "virtualenv >=20.0.24, < 20.21.1", # For pip runtime env. +- "virtualenv >=20.0.24, !=20.21.1", # For pip runtime env. - ], - "client": [ - # The Ray client needs a specific range of gRPC to work: @@ -53,8 +53,16 @@ index affa582097..a26f61f8fb 100644 - if sys.platform == "darwin" - else "grpcio", - ], -- "serve": ["uvicorn", "requests", "starlette", "fastapi", "aiorwlock"], -- "tune": ["pandas", "tensorboardX>=1.9", "requests", pyarrow_dep], +- "serve": [ +- "uvicorn[standard]", +- "requests", +- "starlette", +- # Tracking issue: https://github.com/tiangolo/fastapi/discussions/10948 +- "fastapi <= 0.108.0", +- "aiorwlock", +- "watchfiles", +- ], +- "tune": ["pandas", "tensorboardX>=1.9", "requests", pyarrow_dep, "fsspec"], - "observability": [ - "opentelemetry-api", - "opentelemetry-sdk", @@ -66,19 +74,34 @@ index affa582097..a26f61f8fb 100644 + "serve": [], + "tune": [], + "observability": [], ++ "serve-grpc": [], ++ "rllib": [], ++ "train": [], ++ "air": [], } - +- - # Ray Serve depends on the Ray dashboard components. - setup_spec.extras["serve"] = list( - set(setup_spec.extras["serve"] + setup_spec.extras["default"]) - ) - - if RAY_EXTRA_CPP: - setup_spec.extras["cpp"] = ["ray-cpp==" + setup_spec.version] - +- # Ensure gRPC library exists for Ray Serve gRPC support. +- setup_spec.extras["serve-grpc"] = list( +- set( +- setup_spec.extras["serve"] +- + [ +- "grpcio >= 1.32.0; python_version < '3.10'", # noqa:E501 +- "grpcio >= 1.42.0; python_version >= '3.10'", # noqa:E501 +- ] +- ) +- ) +- +- if RAY_EXTRA_CPP: +- setup_spec.extras["cpp"] = ["ray-cpp==" + setup_spec.version] +- - setup_spec.extras["rllib"] = setup_spec.extras["tune"] + [ - "dm_tree", -- "gymnasium==0.26.3", +- "gymnasium==0.28.1", - "lz4", - "scikit-image", - "pyyaml", @@ -102,34 +125,28 @@ index affa582097..a26f61f8fb 100644 setup_spec.extras["all"] = list( set(chain.from_iterable(setup_spec.extras.values())) ) -@@ -314,25 +250,7 @@ if setup_spec.type == SetupType.RAY: +@@ -334,19 +249,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 = [ - "click >= 7.0", - "filelock", -- "grpcio >= 1.32.0; python_version < '3.10'", # noqa:E501 -- "grpcio >= 1.42.0; python_version >= '3.10'", # noqa:E501 - "jsonschema", - "msgpack >= 1.0.0, < 2.0.0", -- "numpy >= 1.16; python_version < '3.9'", -- "numpy >= 1.19.3; python_version >= '3.9'", - "packaging", - "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'", - ] +- + setup_spec.install_requires = [] - def is_native_windows_or_msys(): -@@ -793,7 +711,7 @@ setuptools.setup( + """Check to see if we are running on native Windows, +@@ -781,7 +684,7 @@ setuptools.setup( # The BinaryDistribution argument triggers build_ext. distclass=BinaryDistribution, install_requires=setup_spec.install_requires, @@ -139,4 +156,5 @@ index affa582097..a26f61f8fb 100644 entry_points={ "console_scripts": [ -- -2.39.2 (Apple Git-143) +2.34.1 + diff --git a/recipe/patches/0005-Ignore-warnings-in-event.cc-and-logging.cc.patch b/recipe/patches/0005-Ignore-warnings-in-event.cc-and-logging.cc.patch index d251ce60..abe14ba9 100644 --- a/recipe/patches/0005-Ignore-warnings-in-event.cc-and-logging.cc.patch +++ b/recipe/patches/0005-Ignore-warnings-in-event.cc-and-logging.cc.patch @@ -1,27 +1,26 @@ -From 2aa949a3877b5f2e30a463e05cec067da13b18b1 Mon Sep 17 00:00:00 2001 -From: Nishidha Panpaliya -Date: Fri, 9 Jun 2023 06:26:12 +0000 -Subject: [PATCH] Ignore warnings in event.cc and logging.cc +From 1165d8f367dbce45ef39f5f43d246fa9937a1053 Mon Sep 17 00:00:00 2001 +From: Vasily Litvinov +Date: Fri, 3 Dec 2021 10:59:10 -0800 +Subject: [PATCH 3/7] Ignore warnings in event.cc and logging.cc --- - .bazelrc | 4 ++++ - 1 file changed, 4 insertions(+) + .bazelrc | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/.bazelrc b/.bazelrc -index e81c646c15..892bfc6a19 100644 +index c9ba801319..f5bd8997de 100644 --- a/.bazelrc +++ b/.bazelrc -@@ -44,6 +44,10 @@ build:clang-cl --per_file_copt="-\\.(asm|S)$@-Werror" +@@ -49,6 +49,9 @@ build:clang-cl --per_file_copt="-\\.(asm|S)$@-Werror" build:msvc-cl --per_file_copt="-\\.(asm|S)$@-WX" # Ignore warnings for protobuf generated files and external projects. build --per_file_copt="\\.pb\\.cc$@-w" +# Ignore one specific warning +build --per_file_copt="event\\.cc$@-w" +build --per_file_copt="logging\\.cc$@-w" -+ build:linux --per_file_copt="-\\.(asm|S)$,external/.*@-w,-Wno-error=implicit-function-declaration" build:macos --per_file_copt="-\\.(asm|S)$,external/.*@-w,-Wno-error=implicit-function-declaration" - # Ignore minor warnings for host tools, which we generally can't control + # Ignore warnings for host tools, which we generally can't control. -- 2.34.1 diff --git a/recipe/patches/0007-Remove-bazel-version-check.patch b/recipe/patches/0007-Remove-bazel-version-check.patch deleted file mode 100644 index d516d87f..00000000 --- a/recipe/patches/0007-Remove-bazel-version-check.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0da8732a8d99c436c574bdbb24fe2e35df5e0a7c Mon Sep 17 00:00:00 2001 -From: Jiajun Yao -Date: Thu, 9 Dec 2021 08:45:59 -0800 -Subject: [PATCH 7/7] Remove bazel version check - -Signed-off-by: Jiajun Yao ---- - python/setup.py | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/python/setup.py b/python/setup.py -index 565237825..80613e107 100644 ---- a/python/setup.py -+++ b/python/setup.py -@@ -424,17 +424,6 @@ def build(build_python, build_java, build_cpp): - ] + pip_packages, - env=dict(os.environ, CC="gcc")) - -- version_info = bazel_invoke(subprocess.check_output, ["--version"]) -- bazel_version_str = version_info.rstrip().decode("utf-8").split(" ", 1)[1] -- bazel_version_split = bazel_version_str.split(".") -- bazel_version_digits = [ -- "".join(takewhile(str.isdigit, s)) for s in bazel_version_split -- ] -- bazel_version = tuple(map(int, bazel_version_digits)) -- if bazel_version < SUPPORTED_BAZEL: -- logger.warning("Expected Bazel version {} but found {}".format( -- ".".join(map(str, SUPPORTED_BAZEL)), bazel_version_str)) -- - bazel_flags = ["--verbose_failures"] - - if not is_automated_build: --- -2.30.1 (Apple Git-130) - diff --git a/recipe/patches/0007-Update-skylib-commit.patch b/recipe/patches/0007-Update-skylib-commit.patch new file mode 100644 index 00000000..c22af80a --- /dev/null +++ b/recipe/patches/0007-Update-skylib-commit.patch @@ -0,0 +1,27 @@ +From e450f7d9068cee22bed1498f13197ff69d5b56dc Mon Sep 17 00:00:00 2001 +From: ArchanaShinde1 +Date: Mon, 11 Mar 2024 12:17:29 +0000 +Subject: [PATCH] Update skylib commit + +--- + bazel/ray_deps_setup.bzl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index f91eb303c4..db82bf3369 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -155,8 +155,8 @@ def ray_deps_setup(): + auto_http_archive( + name = "bazel_skylib", + strip_prefix = None, +- url = "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", +- sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", ++ url = "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", ++ sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", + ) + + auto_http_archive( +-- +2.40.1 + diff --git a/recipe/patches/0008-Fix-replace_symlinks_with_junctions.patch b/recipe/patches/0008-Fix-replace_symlinks_with_junctions.patch deleted file mode 100644 index 878c4cc7..00000000 --- a/recipe/patches/0008-Fix-replace_symlinks_with_junctions.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 495a4d5d5056d7bbf6aac1f0e6816ebc5899ee4b Mon Sep 17 00:00:00 2001 -From: Jiajun Yao -Date: Tue, 18 Jan 2022 09:40:46 -0800 -Subject: [PATCH 8/8] Fix replace_symlinks_with_junctions - -Signed-off-by: Jiajun Yao ---- - python/setup.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/python/setup.py b/python/setup.py -index 80613e107..9e089329d 100644 ---- a/python/setup.py -+++ b/python/setup.py -@@ -314,7 +314,7 @@ def replace_symlinks_with_junctions(): - - # Update this list if new symlinks are introduced to the source tree - _LINKS = { -- r"ray\new_dashboard": "../../dashboard", -+ r"ray\dashboard": "../../dashboard", - r"ray\rllib": "../../rllib", - r"ray\streaming": "../../streaming/python/", - } -@@ -353,7 +353,7 @@ def replace_symlinks_with_junctions(): - os.path.join(os.path.dirname(path), target)) - logger.info("Setting {} -> {}".format(link, target)) - subprocess.check_call( -- f"MKLINK /J '{os.path.basename(link)}' '{target}'", -+ f'MKLINK /J "{os.path.basename(link)}" "{target}"', - shell=True, - cwd=os.path.dirname(path)) - --- -2.30.1 (Apple Git-130) - diff --git a/recipe/patches/0009-Update-protobuf-to-3.19.1.patch b/recipe/patches/0009-Update-protobuf-to-3.19.1.patch deleted file mode 100644 index 45f1c8fd..00000000 --- a/recipe/patches/0009-Update-protobuf-to-3.19.1.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 65d34812c4c71e4ca9e1a1e5d2efb80f0f004d89 Mon Sep 17 00:00:00 2001 -From: Nishidha Panpaliya -Date: Mon, 19 Sep 2022 11:09:55 +0000 -Subject: [PATCH] Updated protobuf to 3.19 - ---- - bazel/ray_deps_setup.bzl | 7 +-- - thirdparty/patches/protobuf.patch | 72 +++++++++++++++++++++++++++++++ - 2 files changed, 76 insertions(+), 3 deletions(-) - create mode 100644 thirdparty/patches/protobuf.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 4b332b094..9f0ecd229 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -88,9 +88,10 @@ def ray_deps_setup(): - # https://github.com/ray-project/ray/issues/14117 - http_archive( - name = "com_google_protobuf", -- strip_prefix = "protobuf-3.16.0", -- urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.16.0.tar.gz"], -- sha256 = "7892a35d979304a404400a101c46ce90e85ec9e2a766a86041bb361f626247f5", -+ strip_prefix = "protobuf-3.19.1", -+ patches = ["@com_github_ray_project_ray//thirdparty/patches:protobuf.patch"], -+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"], -+ sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422", - ) - - # NOTE(lingxuan.zlx): 3rd party dependencies could be accessed, so it suggests -diff --git a/thirdparty/patches/protobuf.patch b/thirdparty/patches/protobuf.patch -new file mode 100644 -index 000000000..fe8309f58 ---- /dev/null -+++ b/thirdparty/patches/protobuf.patch -@@ -0,0 +1,72 @@ -+From 8caa0525e6f8faf9b89bcccb2f8fb4ade06f45f3 Mon Sep 17 00:00:00 2001 -+From: Nishidha Panpaliya -+Date: Tue, 22 Mar 2022 08:02:04 -0400 -+Subject: [PATCH] Protobuf changes -+ -+--- -+ BUILD | 4 +++- -+ python/google/protobuf/pyext/message.cc | 4 ++++ -+ python/google/protobuf/pyext/unknown_fields.cc | 2 +- -+ 3 files changed, 8 insertions(+), 2 deletions(-) -+ -+diff --git BUILD BUILD -+index 1690d4219..6c1de4a1e 100644 -+--- BUILD -++++ BUILD -+@@ -19,7 +19,7 @@ exports_files(["LICENSE"]) -+ # ZLIB configuration -+ ################################################################################ -+ -+-ZLIB_DEPS = ["@zlib//:zlib"] -++ZLIB_DEPS = ["@zlib"] -+ -+ ################################################################################ -+ # Protobuf Runtime Library -+@@ -196,6 +196,7 @@ cc_library( -+ copts = COPTS, -+ includes = ["src/"], -+ linkopts = LINK_OPTS, -++ alwayslink = 1, -+ visibility = ["//visibility:public"], -+ ) -+ -+@@ -269,6 +270,7 @@ cc_library( -+ copts = COPTS, -+ includes = ["src/"], -+ linkopts = LINK_OPTS, -++ alwayslink = 1, -+ visibility = ["//visibility:public"], -+ deps = [":protobuf_lite"] + PROTOBUF_DEPS, -+ ) -+diff --git python/google/protobuf/pyext/message.cc python/google/protobuf/pyext/message.cc -+index cb48faa44..184e27274 100644 -+--- python/google/protobuf/pyext/message.cc -++++ python/google/protobuf/pyext/message.cc -+@@ -2957,7 +2957,11 @@ bool InitProto2MessageModule(PyObject *m) { -+ reinterpret_cast(&RepeatedCompositeContainer_Type)); -+ -+ // Register them as MutableSequence. -++#if PY_MAJOR_VERSION >= 3 -+ ScopedPyObjectPtr collections(PyImport_ImportModule("collections.abc")); -++#else -++ ScopedPyObjectPtr collections(PyImport_ImportModule("collections")); -++#endif -+ if (collections == NULL) { -+ return false; -+ } -+diff --git python/google/protobuf/pyext/unknown_fields.cc python/google/protobuf/pyext/unknown_fields.cc -+index 7f4fb23ed..73a518c9f 100644 -+--- python/google/protobuf/pyext/unknown_fields.cc -++++ python/google/protobuf/pyext/unknown_fields.cc -+@@ -218,7 +218,7 @@ const UnknownField* GetUnknownField(PyUnknownFieldRef* self) { -+ "The parent message might be cleared."); -+ return NULL; -+ } -+- ssize_t total_size = fields->field_count(); -++ Py_ssize_t total_size = fields->field_count(); -+ if (self->index >= total_size) { -+ PyErr_Format(PyExc_ValueError, -+ "UnknownField does not exist. " -+-- -+2.23.0 -+ --- -2.34.1 - diff --git a/recipe/patches/0009-fixed-grpc-issue.patch b/recipe/patches/0009-fixed-grpc-issue.patch new file mode 100644 index 00000000..57a2bcf0 --- /dev/null +++ b/recipe/patches/0009-fixed-grpc-issue.patch @@ -0,0 +1,136 @@ +From 5c3f2351d56eb1acf6b413d26e0b51258cf67c28 Mon Sep 17 00:00:00 2001 +From: ArchanaShinde1 +Date: Mon, 11 Mar 2024 11:36:04 +0000 +Subject: [PATCH 9/9] fixed grpc issue + +--- + bazel/ray_deps_setup.bzl | 20 +++++------ + thirdparty/patches/grpc-cython-copts.patch | 42 +++++++++++++++------- + 2 files changed, 40 insertions(+), 22 deletions(-) + +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index ce6b9d9a08..f01db1d1ec 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -89,11 +89,11 @@ def ray_deps_setup(): + # This is copied from grpc's bazel/grpc_deps.bzl + http_archive( + name = "com_google_protobuf", +- sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd", +- strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a", ++ sha256 = "d594b561fb41bf243233d8f411c7f2b7d913e5c9c1be4ca439baf7e48384c893", ++ strip_prefix = "protobuf-f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c", + urls = [ +- # https://github.com/protocolbuffers/protobuf/commits/v23.4 +- "https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz", ++ # https://github.com/protocolbuffers/protobuf/commits/v21.12 ++ "https://github.com/protocolbuffers/protobuf/archive/f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c.tar.gz", + ], + patches = [ + "@com_github_grpc_grpc//third_party:protobuf.patch", +@@ -235,8 +235,8 @@ def ray_deps_setup(): + auto_http_archive( + name = "com_github_grpc_grpc", + # NOTE: If you update this, also update @boringssl's hash. +- url = "https://github.com/grpc/grpc/archive/refs/tags/v1.57.1.tar.gz", +- sha256 = "0762f809b9de845e6a7c809cabccad6aa4143479fd43b396611fe5a086c0aeeb", ++ url = "https://github.com/grpc/grpc/archive/refs/tags/v1.54.3.tar.gz", ++ sha256 = "17e4e1b100657b88027721220cbfb694d86c4b807e9257eaf2fb2d273b41b1b1", + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", + ], +@@ -278,13 +278,13 @@ def ray_deps_setup(): + http_archive( + # This rule is used by @com_github_grpc_grpc, and using a GitHub mirror + # provides a deterministic archive hash for caching. Explanation here: +- # https://github.com/grpc/grpc/blob/1ff1feaa83e071d87c07827b0a317ffac673794f/bazel/grpc_deps.bzl#L189 ++ # https://github.com/grpc/grpc/blob/v1.54.3/bazel/grpc_deps.bzl#L226 + # Ensure this rule matches the rule used by grpc's bazel/grpc_deps.bzl + name = "boringssl", +- sha256 = "0675a4f86ce5e959703425d6f9063eaadf6b61b7f3399e77a154c0e85bad46b1", +- strip_prefix = "boringssl-342e805bc1f5dfdd650e3f031686d6c939b095d9", ++ sha256 = "a8b2c40d5223ca951d463ed73dd810836dccdafd8f948db6fb4fb709b9827ab5", ++ strip_prefix = "boringssl-8872d958b7b07173bf29b8f3b8bf36a1ca8c94a3", + urls = [ +- "https://github.com/google/boringssl/archive/342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz", ++ "https://github.com/google/boringssl/archive/8872d958b7b07173bf29b8f3b8bf36a1ca8c94a3.tar.gz", + ], + ) + +diff --git a/thirdparty/patches/grpc-cython-copts.patch b/thirdparty/patches/grpc-cython-copts.patch +index c893cab1bd..5c3284b4ae 100644 +--- a/thirdparty/patches/grpc-cython-copts.patch ++++ b/thirdparty/patches/grpc-cython-copts.patch +@@ -1,39 +1,57 @@ ++From 81e22b706ff85e27d0cccd34ce271adeb53b85bb Mon Sep 17 00:00:00 2001 ++From: ArchanaShinde1 ++Date: Mon, 11 Mar 2024 11:15:55 +0000 ++Subject: [PATCH] grpc cython patched ++ ++--- ++ bazel/cython_library.bzl | 21 +++++++++++---------- ++ 1 file changed, 11 insertions(+), 10 deletions(-) ++ + diff --git bazel/cython_library.bzl bazel/cython_library.bzl ++index 8e003c2246..0bc35d503f 100644 + --- bazel/cython_library.bzl + +++ bazel/cython_library.bzl +-@@ -10,15 +10,16 @@ ++@@ -19,18 +19,18 @@ ++ # been written at cython/cython and tensorflow/tensorflow. We branch from ++ # Tensorflow's version as it is more actively maintained and works for gRPC ++ # Python's needs. + -def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs): + +def pyx_library(name, deps = [], cc_kwargs = {}, py_deps = [], srcs = [], **kwargs): + """Compiles a group of .pyx / .pxd / .py files. +- ++ + First runs Cython to create .cpp files for each input .pyx or .py + .pxd + - pair. Then builds a shared object for each, passing "deps" to each cc_binary + - rule (includes Python headers by default). Finally, creates a py_library rule + - with the shared objects and any pure Python "srcs", with py_deps as its + - dependencies; the shared objects can be imported like normal Python files. ++- + + pair. Then builds a shared object for each, passing "deps" and `**cc_kwargs` + + to each cc_binary rule (includes Python headers by default). Finally, creates + + a py_library rule with the shared objects and any pure Python "srcs", with py_deps + + as its dependencies; the shared objects can be imported like normal Python files. +- + Args: + name: Name for the rule. + deps: C/C++ dependencies of the Cython (e.g. Numpy headers). + + cc_kwargs: cc_binary extra arguments such as copts, linkstatic, linkopts, features +-@@ -57,7 +59,8 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs): +-- shared_object_name = stem + ".so" +-+ shared_object_name = stem + ".so" ++ py_deps: Pure Python dependencies of the final library. ++ srcs: .py, .pyx, or .pxd files to either compile or pass through. ++ **kwargs: Extra keyword arguments passed to the py_library. ++@@ -69,10 +69,11 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs): ++ stem = src.split(".")[0] ++ shared_object_name = stem + ".so" + native.cc_binary( + - name = shared_object_name, +-+ name = cc_kwargs.pop("name", shared_object_name), + - srcs = [stem + ".cpp"], +-+ srcs = [stem + ".cpp"] + cc_kwargs.pop("srcs", []), + - deps = deps + ["@local_config_python//:python_headers"], +-+ deps = deps + ["@local_config_python//:python_headers"] + cc_kwargs.pop("deps", []), +-- defines = defines, +-+ defines = defines, + - linkshared = 1, +++ name = cc_kwargs.pop("name", shared_object_name), +++ srcs = [stem + ".cpp"] + cc_kwargs.pop("srcs", []), +++ deps = deps + ["@local_config_python//:python_headers"] + cc_kwargs.pop("deps", []), + + linkshared = cc_kwargs.pop("linkshared", 1), + + **cc_kwargs + ) +--- ++ shared_objects.append(shared_object_name) ++ ++-- ++2.40.1 ++ +-- +2.40.1 + diff --git a/recipe/patches/0012-Changed-min-bazel-version-to-5.3.patch b/recipe/patches/0012-Changed-min-bazel-version-to-5.3.patch deleted file mode 100644 index f2429e04..00000000 --- a/recipe/patches/0012-Changed-min-bazel-version-to-5.3.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 84887a38693e8aca83ca83a7dd75de75414dc0e0 Mon Sep 17 00:00:00 2001 -From: Deepali Chourasia -Date: Fri, 25 Aug 2023 13:23:42 +0000 -Subject: [PATCH] Changed min bazel version to 5.3 - ---- - WORKSPACE | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/WORKSPACE b/WORKSPACE -index f995b3b422..e7261cea05 100644 ---- a/WORKSPACE -+++ b/WORKSPACE -@@ -22,7 +22,7 @@ load("@bazel_skylib//lib:versions.bzl", "versions") - # it in CI. - - # Please keep this in sync with the .bazeliskrc file. --versions.check(minimum_bazel_version = "5.4.1") -+versions.check(minimum_bazel_version = "5.3.0") - - # Tools to generate `compile_commands.json` to enable awesome tooling of the C language family. - # Just run `bazel run @hedron_compile_commands//:refresh_all` --- -2.34.1 - diff --git a/recipe/patches/0014-allow-builds-with-root-user.patch b/recipe/patches/0014-allow-builds-with-root-user.patch deleted file mode 100644 index 3d853d6b..00000000 --- a/recipe/patches/0014-allow-builds-with-root-user.patch +++ /dev/null @@ -1,24 +0,0 @@ -From de6dd93b9f9d5051da551c321dc4ee734964acad Mon Sep 17 00:00:00 2001 -From: Deepali Chourasia -Date: Fri, 28 Jul 2023 03:59:26 -0500 -Subject: [PATCH] allow builds with root user - ---- - WORKSPACE | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/WORKSPACE b/WORKSPACE -index eb6aeba907..e9aac6ba14 100644 ---- a/WORKSPACE -+++ b/WORKSPACE -@@ -44,6 +44,7 @@ python_register_toolchains( - name = "python3_9", - python_version = "3.9", - register_toolchains = False, -+ ignore_root_user_error = True, - ) - - load("@python3_9//:defs.bzl", bk_python = "interpreter") --- -2.23.0 -