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