add custom huggingface_hub packages (learning from hf-cli's authentication workflow)
This commit is contained in:
parent
d68132b8fb
commit
7ab29bfe07
3 changed files with 153 additions and 0 deletions
35
hosts/packages/huggingface_hub/flake.nix
Normal file
35
hosts/packages/huggingface_hub/flake.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Template: https://nixos-and-flakes.thiscute.world/development/intro
|
||||
{
|
||||
description = "Humanity's Last Exam - Devshell";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
python = pkgs.python312.override {
|
||||
self = python;
|
||||
packageOverrides = pyfinal: pyprev: {
|
||||
huggingface-hub = pyfinal.callPackage ./huggingface_hub.nix {};
|
||||
hf-xet = pyfinal.callPackage ./hf-xet.nix {};
|
||||
};
|
||||
};
|
||||
in {
|
||||
devShells."${system}".default = pkgs.mkShell {
|
||||
packages = [
|
||||
(python.withPackages (pypkgs: [
|
||||
pypkgs.huggingface-hub
|
||||
]))
|
||||
];
|
||||
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
shellHook = ''
|
||||
alias hf=huggingface-cli
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue