diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/python-modules/ray | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ray')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/ray/binary-hashes.nix | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/ray/default.nix | 172 |
2 files changed, 183 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ray/binary-hashes.nix b/nixpkgs/pkgs/development/python-modules/ray/binary-hashes.nix new file mode 100644 index 000000000000..993c1516bccb --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ray/binary-hashes.nix @@ -0,0 +1,11 @@ +{ + cp39 = { + sha256 = "4889b457363a3cfa52088b3572b864ebb391806371bc59b2bb047e44f999bb32"; + }; + cp310 = { + sha256 = "5ed5a29795b122e9e2b832d5224ab9b1cc235beab700d2a413b23c63b3d3c80c"; + }; + cp311 = { + sha256 = "d316861298f6e996f4841e4160ed38dc289f81cf0ffe9874dc14ef7e4e5a9190"; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/ray/default.nix b/nixpkgs/pkgs/development/python-modules/ray/default.nix new file mode 100644 index 000000000000..711e6bd34f35 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ray/default.nix @@ -0,0 +1,172 @@ +{ aiohttp +, aiohttp-cors +, aiorwlock +, aiosignal +, attrs +, autoPatchelfHook +, buildBazelPackage +, buildPythonPackage +, fetchPypi +, click +, cloudpickle +, colorama +, colorful +, cython +, dm-tree +, fastapi +, filelock +, frozenlist +, fsspec +, gpustat +, grpc +, grpcio +, gym +, jsonschema +, lib +, lz4 +, matplotlib +, msgpack +, numpy +, opencensus +, packaging +, pandas +, py-spy +, prometheus-client +, protobuf3_20 +, psutil +, pyarrow +, pydantic +, python +, pythonAtLeast +, pythonOlder +, pythonRelaxDepsHook +, pyyaml +, redis +, requests +, scikit-image +, scipy +, setproctitle +, smart-open +, starlette +, stdenv +, tabulate +, tensorboardx +, uvicorn +, virtualenv +}: + +let + pname = "ray"; + version = "2.4.0"; +in +buildPythonPackage rec { + inherit pname version; + format = "wheel"; + + disabled = pythonOlder "3.9" || pythonAtLeast "3.12"; + + src = + let + pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; + binary-hash = (import ./binary-hashes.nix)."${pyShortVersion}" or {}; + in + fetchPypi ({ + inherit pname version format; + dist = pyShortVersion; + python = pyShortVersion; + abi = pyShortVersion; + platform = "manylinux2014_x86_64"; + } // binary-hash); + + passthru.optional-dependencies = rec { + data-deps = [ + pandas + pyarrow + fsspec + ]; + + serve-deps = [ + aiorwlock + fastapi + pandas + starlette + uvicorn + ]; + + tune-deps = [ + tabulate + tensorboardx + ]; + + rllib-deps = tune-deps ++ [ + dm-tree + gym + lz4 + matplotlib + scikit-image + pyyaml + scipy + ]; + + air-deps = data-deps ++ serve-deps ++ tune-deps ++ rllib-deps; + }; + + nativeBuildInputs = [ + autoPatchelfHook + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "click" + "grpcio" + "protobuf" + ]; + + propagatedBuildInputs = [ + attrs + aiohttp + aiohttp-cors + aiosignal + click + cloudpickle + colorama + colorful + cython + filelock + frozenlist + gpustat + grpcio + jsonschema + msgpack + numpy + opencensus + packaging + py-spy + prometheus-client + protobuf3_20 + psutil + pydantic + pyyaml + requests + setproctitle + smart-open + virtualenv + ]; + + postInstall = '' + chmod +x $out/${python.sitePackages}/ray/core/src/ray/{gcs/gcs_server,raylet/raylet} + ''; + + pythonImportsCheck = [ + "ray" + ]; + + meta = with lib; { + description = "A unified framework for scaling AI and Python applications"; + homepage = "https://github.com/ray-project/ray"; + changelog = "https://github.com/ray-project/ray/releases/tag/ray-${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ billhuang ]; + platforms = [ "x86_64-linux" ]; + }; +} |