python3Packages.huggingface: reintroduce at 0.36.2
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
filelock,
|
||||
fsspec,
|
||||
hf-xet,
|
||||
packaging,
|
||||
pyyaml,
|
||||
requests,
|
||||
tqdm,
|
||||
typing-extensions,
|
||||
|
||||
# optional-dependencies
|
||||
# cli
|
||||
inquirerpy,
|
||||
# inference
|
||||
aiohttp,
|
||||
# torch
|
||||
torch,
|
||||
safetensors,
|
||||
# hf_transfer
|
||||
hf-transfer,
|
||||
# fastai
|
||||
toml,
|
||||
fastai,
|
||||
fastcore,
|
||||
# tensorflow
|
||||
tensorflow,
|
||||
pydot,
|
||||
graphviz,
|
||||
# tensorflow-testing
|
||||
keras,
|
||||
|
||||
# tests
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "huggingface-hub";
|
||||
version = "0.36.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huggingface";
|
||||
repo = "huggingface_hub";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-cUp5Mm8vgJI/0N/9inQVedGWRde8lioduFoccq6b7UE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
filelock
|
||||
fsspec
|
||||
hf-xet
|
||||
packaging
|
||||
pyyaml
|
||||
requests
|
||||
tqdm
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
all = [
|
||||
|
||||
];
|
||||
cli = [
|
||||
inquirerpy
|
||||
];
|
||||
inference = [
|
||||
aiohttp
|
||||
];
|
||||
torch = [
|
||||
torch
|
||||
safetensors
|
||||
]
|
||||
++ safetensors.optional-dependencies.torch;
|
||||
hf_transfer = [
|
||||
hf-transfer
|
||||
];
|
||||
fastai = [
|
||||
toml
|
||||
fastai
|
||||
fastcore
|
||||
];
|
||||
tensorflow = [
|
||||
tensorflow
|
||||
pydot
|
||||
graphviz
|
||||
];
|
||||
tensorflow-testing = [
|
||||
tensorflow
|
||||
keras
|
||||
];
|
||||
hf_xet = [
|
||||
hf-xet
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = "version";
|
||||
|
||||
pythonImportsCheck = [ "huggingface_hub" ];
|
||||
|
||||
meta = {
|
||||
description = "Download and publish models and other files on the huggingface.co hub";
|
||||
mainProgram = "hf";
|
||||
homepage = "https://github.com/huggingface/huggingface_hub";
|
||||
changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
GaetanLepage
|
||||
osbm
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -7184,6 +7184,8 @@ self: super: with self; {
|
||||
|
||||
huggingface-hub = callPackage ../development/python-modules/huggingface-hub { };
|
||||
|
||||
huggingface-hub_0 = callPackage ../development/python-modules/huggingface-hub/0.nix { };
|
||||
|
||||
human-readable = callPackage ../development/python-modules/human-readable { };
|
||||
|
||||
humanfriendly = callPackage ../development/python-modules/humanfriendly { };
|
||||
|
||||
Reference in New Issue
Block a user