From 10b646cecb2038d36914bd6a64eb9e84122077e8 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 10 Sep 2024 22:04:43 +0200 Subject: [PATCH] exo: init at 0-unstable-2024-10-03 --- pkgs/by-name/ex/exo/package.nix | 91 +++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 pkgs/by-name/ex/exo/package.nix diff --git a/pkgs/by-name/ex/exo/package.nix b/pkgs/by-name/ex/exo/package.nix new file mode 100644 index 000000000000..ead32ff3b121 --- /dev/null +++ b/pkgs/by-name/ex/exo/package.nix @@ -0,0 +1,91 @@ +{ + lib, + stdenv, + fetchFromGitHub, + python3Packages, +}: +python3Packages.buildPythonApplication { + pname = "exo"; + version = "0-unstable-2024-10-02"; + pyproject = true; + + src = fetchFromGitHub { + owner = "exo-explore"; + repo = "exo"; + rev = "2654f290c3179aa143960e336e8985a8b6f6b72b"; + hash = "sha256-jaIeK3sn6Swi20DNnvDtSAIt3DXIN0OQDiozNUHqtjs="; + }; + + build-system = with python3Packages; [ setuptools ]; + + pythonRelaxDeps = [ + "aiohttp" + "aiofiles" + "blobfile" + "grpcio-tools" + "huggingface-hub" + "numpy" + "protobuf" + "pynvml" + "safetensors" + "tenacity" + "tokenizers" + "transformers" + ]; + + pythonRemoveDeps = [ "uuid" ]; + + dependencies = with python3Packages; [ + aiohttp + aiohttp-cors + aiofiles + blobfile + grpcio + grpcio-tools + hf-transfer + huggingface-hub + jinja2 + netifaces + numpy + pillow + prometheus-client + protobuf + psutil + pynvml + requests + rich + safetensors + tailscale + tenacity + tiktoken + tokenizers + tqdm + transformers + tinygrad + ]; + + pythonImportsCheck = [ + "exo" + "exo.inference.tinygrad.models" + ]; + + nativeCheckInputs = with python3Packages; [ + mlx + pytestCheckHook + ]; + + disabledTestPaths = [ + "test/test_tokenizers.py" + ]; + + # Tests require `mlx` which is not supported on linux. + doCheck = stdenv.isDarwin; + + meta = { + description = "Run your own AI cluster at home with everyday devices"; + homepage = "https://github.com/exo-explore/exo"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ GaetanLepage ]; + mainProgram = "exo"; + }; +}