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