acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / op / openllm / package.nix
blobf25286d4608b2061d3d29b253d6ad70df3dca804
2   lib,
3   fetchFromGitHub,
4   python3,
5 }:
6 let
7   python = python3.override {
8     self = python;
9     packageOverrides = _: super: {
10       cattrs = super.cattrs.overridePythonAttrs (oldAttrs: rec {
11         version = "23.1.2";
12         build-system = [ super.poetry-core ];
13         src = oldAttrs.src.override {
14           rev = "refs/tags/v${version}";
15           hash = "sha256-YO4Clbo5fmXbysxwwM2qCHJwO5KwDC05VctRVFruJcw=";
16         };
17       });
18     };
19   };
22 python.pkgs.buildPythonApplication rec {
23   pname = "openllm";
24   version = "0.6.10";
25   pyproject = true;
27   src = fetchFromGitHub {
28     owner = "bentoml";
29     repo = "openllm";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-4KIpe6KjbBDDUj0IjzSccxjgZyBoaUVIQJYk1+W01Vo=";
32   };
34   pythonRemoveDeps = [
35     "pathlib"
36     "pip-requirements-parser"
37   ];
39   pythonRelaxDeps = [ "openai" ];
41   build-system = with python.pkgs; [
42     hatch-vcs
43     hatchling
44   ];
46   dependencies = with python.pkgs; [
47     accelerate
48     bentoml
49     dulwich
50     nvidia-ml-py
51     openai
52     psutil
53     pyaml
54     questionary
55     tabulate
56     typer
57     uv
58   ];
60   # no tests
61   doCheck = false;
63   pythonImportsCheck = [ "openllm" ];
65   meta = with lib; {
66     description = "Run any open-source LLMs, such as Llama 3.1, Gemma, as OpenAI compatible API endpoint in the cloud";
67     homepage = "https://github.com/bentoml/OpenLLM";
68     changelog = "https://github.com/bentoml/OpenLLM/releases/tag/v${version}";
69     license = licenses.asl20;
70     maintainers = with maintainers; [
71       happysalada
72       natsukium
73     ];
74     mainProgram = "openllm";
75   };