2024-06-05 15:53:02 +00:00
|
|
|
{
|
2024-07-31 10:19:44 +00:00
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
python,
|
|
|
|
fetchPypi,
|
|
|
|
autoPatchelfHook,
|
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
aiohttp,
|
|
|
|
aiohttp-cors,
|
|
|
|
aiosignal,
|
|
|
|
attrs,
|
|
|
|
click,
|
|
|
|
cloudpickle,
|
|
|
|
colorama,
|
|
|
|
colorful,
|
|
|
|
cython,
|
|
|
|
filelock,
|
|
|
|
frozenlist,
|
|
|
|
gpustat,
|
|
|
|
grpcio,
|
|
|
|
jsonschema,
|
|
|
|
msgpack,
|
|
|
|
numpy,
|
|
|
|
opencensus,
|
|
|
|
packaging,
|
|
|
|
prometheus-client,
|
|
|
|
psutil,
|
|
|
|
pydantic,
|
2024-07-31 10:19:44 +00:00
|
|
|
py-spy,
|
2024-06-05 15:53:02 +00:00
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
setproctitle,
|
|
|
|
smart-open,
|
2024-07-31 10:19:44 +00:00
|
|
|
virtualenv,
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
fsspec,
|
|
|
|
pandas,
|
|
|
|
pyarrow,
|
|
|
|
dm-tree,
|
|
|
|
gym,
|
|
|
|
lz4,
|
|
|
|
matplotlib,
|
|
|
|
scikit-image,
|
|
|
|
scipy,
|
|
|
|
aiorwlock,
|
|
|
|
fastapi,
|
2024-06-05 15:53:02 +00:00
|
|
|
starlette,
|
2024-07-31 10:19:44 +00:00
|
|
|
uvicorn,
|
2024-06-05 15:53:02 +00:00
|
|
|
tabulate,
|
|
|
|
tensorboardx,
|
2022-10-30 15:09:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ray";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "2.37.0";
|
2022-10-30 15:09:59 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
inherit pname version;
|
|
|
|
format = "wheel";
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
disabled = pythonOlder "3.10" || pythonAtLeast "3.13";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
src =
|
|
|
|
let
|
2024-06-05 15:53:02 +00:00
|
|
|
pyShortVersion = "cp${builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion}";
|
|
|
|
binary-hash = (import ./binary-hashes.nix)."${pyShortVersion}" or { };
|
2022-10-30 15:09:59 +00:00
|
|
|
in
|
2024-06-05 15:53:02 +00:00
|
|
|
fetchPypi (
|
|
|
|
{
|
|
|
|
inherit pname version format;
|
|
|
|
dist = pyShortVersion;
|
|
|
|
python = pyShortVersion;
|
|
|
|
abi = pyShortVersion;
|
|
|
|
platform = "manylinux2014_x86_64";
|
|
|
|
}
|
|
|
|
// binary-hash
|
|
|
|
);
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"click"
|
|
|
|
"grpcio"
|
|
|
|
"protobuf"
|
2023-08-22 20:05:09 +00:00
|
|
|
"virtualenv"
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2022-10-30 15:09:59 +00:00
|
|
|
aiohttp
|
|
|
|
aiohttp-cors
|
|
|
|
aiosignal
|
2024-07-31 10:19:44 +00:00
|
|
|
attrs
|
2022-10-30 15:09:59 +00:00
|
|
|
click
|
|
|
|
cloudpickle
|
|
|
|
colorama
|
|
|
|
colorful
|
|
|
|
cython
|
|
|
|
filelock
|
|
|
|
frozenlist
|
|
|
|
gpustat
|
|
|
|
grpcio
|
|
|
|
jsonschema
|
|
|
|
msgpack
|
|
|
|
numpy
|
|
|
|
opencensus
|
|
|
|
packaging
|
|
|
|
prometheus-client
|
|
|
|
psutil
|
|
|
|
pydantic
|
2024-07-31 10:19:44 +00:00
|
|
|
py-spy
|
2022-10-30 15:09:59 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
setproctitle
|
|
|
|
smart-open
|
|
|
|
virtualenv
|
|
|
|
];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
optional-dependencies = rec {
|
|
|
|
air-deps = data-deps ++ serve-deps ++ tune-deps ++ rllib-deps;
|
|
|
|
data-deps = [
|
|
|
|
fsspec
|
|
|
|
pandas
|
|
|
|
pyarrow
|
|
|
|
];
|
|
|
|
rllib-deps = tune-deps ++ [
|
|
|
|
dm-tree
|
|
|
|
gym
|
|
|
|
lz4
|
|
|
|
matplotlib
|
|
|
|
pyyaml
|
|
|
|
scikit-image
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
serve-deps = [
|
|
|
|
aiorwlock
|
|
|
|
fastapi
|
|
|
|
pandas
|
|
|
|
starlette
|
|
|
|
uvicorn
|
|
|
|
];
|
|
|
|
tune-deps = [
|
|
|
|
tabulate
|
|
|
|
tensorboardx
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postInstall = ''
|
|
|
|
chmod +x $out/${python.sitePackages}/ray/core/src/ray/{gcs/gcs_server,raylet/raylet}
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ray" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
|
|
|
description = "Unified framework for scaling AI and Python applications";
|
2022-10-30 15:09:59 +00:00
|
|
|
homepage = "https://github.com/ray-project/ray";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/ray-project/ray/releases/tag/ray-${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ billhuang ];
|
2024-09-26 11:04:55 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2022-10-30 15:09:59 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|