biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / ray / default.nix
blob6a9532f953d52f67ea3d7bafc6af9bd412859b5f
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   pythonAtLeast,
6   python,
7   fetchPypi,
8   autoPatchelfHook,
10   # dependencies
11   aiohttp,
12   aiohttp-cors,
13   aiosignal,
14   attrs,
15   click,
16   cloudpickle,
17   colorama,
18   colorful,
19   cython,
20   filelock,
21   frozenlist,
22   gpustat,
23   grpcio,
24   jsonschema,
25   msgpack,
26   numpy,
27   opencensus,
28   packaging,
29   prometheus-client,
30   psutil,
31   pydantic,
32   py-spy,
33   pyyaml,
34   requests,
35   setproctitle,
36   smart-open,
37   virtualenv,
39   # optional-dependencies
40   fsspec,
41   pandas,
42   pyarrow,
43   dm-tree,
44   gym,
45   lz4,
46   matplotlib,
47   scikit-image,
48   scipy,
49   aiorwlock,
50   fastapi,
51   starlette,
52   uvicorn,
53   tabulate,
54   tensorboardx,
57 let
58   pname = "ray";
59   version = "2.37.0";
61 buildPythonPackage rec {
62   inherit pname version;
63   format = "wheel";
65   disabled = pythonOlder "3.10" || pythonAtLeast "3.13";
67   src =
68     let
69       pyShortVersion = "cp${builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion}";
70       binary-hash = (import ./binary-hashes.nix)."${pyShortVersion}" or { };
71     in
72     fetchPypi (
73       {
74         inherit pname version format;
75         dist = pyShortVersion;
76         python = pyShortVersion;
77         abi = pyShortVersion;
78         platform = "manylinux2014_x86_64";
79       }
80       // binary-hash
81     );
83   nativeBuildInputs = [
84     autoPatchelfHook
85   ];
87   pythonRelaxDeps = [
88     "click"
89     "grpcio"
90     "protobuf"
91     "virtualenv"
92   ];
94   dependencies = [
95     aiohttp
96     aiohttp-cors
97     aiosignal
98     attrs
99     click
100     cloudpickle
101     colorama
102     colorful
103     cython
104     filelock
105     frozenlist
106     gpustat
107     grpcio
108     jsonschema
109     msgpack
110     numpy
111     opencensus
112     packaging
113     prometheus-client
114     psutil
115     pydantic
116     py-spy
117     pyyaml
118     requests
119     setproctitle
120     smart-open
121     virtualenv
122   ];
124   optional-dependencies = rec {
125     air-deps = data-deps ++ serve-deps ++ tune-deps ++ rllib-deps;
126     data-deps = [
127       fsspec
128       pandas
129       pyarrow
130     ];
131     rllib-deps = tune-deps ++ [
132       dm-tree
133       gym
134       lz4
135       matplotlib
136       pyyaml
137       scikit-image
138       scipy
139     ];
140     serve-deps = [
141       aiorwlock
142       fastapi
143       pandas
144       starlette
145       uvicorn
146     ];
147     tune-deps = [
148       tabulate
149       tensorboardx
150     ];
151   };
153   postInstall = ''
154     chmod +x $out/${python.sitePackages}/ray/core/src/ray/{gcs/gcs_server,raylet/raylet}
155   '';
157   pythonImportsCheck = [ "ray" ];
159   meta = {
160     description = "Unified framework for scaling AI and Python applications";
161     homepage = "https://github.com/ray-project/ray";
162     changelog = "https://github.com/ray-project/ray/releases/tag/ray-${version}";
163     license = lib.licenses.asl20;
164     maintainers = with lib.maintainers; [ billhuang ];
165     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
166     platforms = [ "x86_64-linux" ];
167   };