File tree Expand file tree Collapse file tree 8 files changed +61
-62
lines changed
Expand file tree Collapse file tree 8 files changed +61
-62
lines changed Original file line number Diff line number Diff line change 2121 nix_path : nixpkgs=channel:nixos-unstable
2222 - uses : cachix/cachix-action@v14
2323 with :
24- name : text-generation-inference
24+ name : huggingface
2525 # If you chose signing key for write access
2626 authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
2727 env :
Original file line number Diff line number Diff line change 2020 nix_path : nixpkgs=channel:nixos-unstable
2121 - uses : cachix/cachix-action@v14
2222 with :
23- name : text-generation-inference
23+ name : huggingface
2424 # If you chose signing key for write access
2525 authToken : " ${{ secrets.CACHIX_AUTH_TOKEN }}"
2626 env :
Original file line number Diff line number Diff line change 2525 nix_path : nixpkgs=channel:nixos-unstable
2626 - uses : cachix/cachix-action@v14
2727 with :
28- name : text-generation-inference
28+ name : huggingface
2929 # If you chose signing key for write access
3030 authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
3131 env :
Original file line number Diff line number Diff line change 66FROM nixos/nix:2.18.8 AS builder
77RUN echo "experimental-features = nix-command flakes" > > /etc/nix/nix.conf
88RUN nix profile install nixpkgs #cachix
9- RUN cachix use text-generation-inference
9+ RUN cachix use huggingface
1010WORKDIR /root
1111ADD . .
1212RUN nix build .
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ Another option is to install `text-generation-inference` locally using [Nix](htt
256256we only support Nix on x86_64 Linux with CUDA GPUs. When using Nix, all dependencies can
257257be pulled from a binary cache, removing the need to build them locally.
258258
259- First follow the instructions to [install Cachix and enable the TGI cache](https://app.cachix.org/cache/text-generation-inference ).
259+ First follow the instructions to [install Cachix and enable the Hugging Face cache](https://app.cachix.org/cache/huggingface ).
260260Setting up the cache is important, otherwise Nix will build many of the dependencies
261261locally, which can take hours.
262262
Original file line number Diff line number Diff line change 22 inputs = {
33 crate2nix = {
44 url = "github:nix-community/crate2nix" ;
5- inputs . nixpkgs . follows = "tgi -nix/nixpkgs" ;
5+ inputs . nixpkgs . follows = "hf -nix/nixpkgs" ;
66 } ;
77 nix-filter . url = "github:numtide/nix-filter" ;
8- tgi -nix. url = "github:huggingface/text-generation-inference- nix/merge-with-kernel-builder " ;
9- nixpkgs . follows = "tgi -nix/nixpkgs" ;
8+ hf -nix. url = "github:huggingface/hf- nix" ;
9+ nixpkgs . follows = "hf -nix/nixpkgs" ;
1010 flake-utils . url = "github:numtide/flake-utils" ;
1111 rust-overlay = {
1212 url = "github:oxalica/rust-overlay" ;
13- inputs . nixpkgs . follows = "tgi -nix/nixpkgs" ;
13+ inputs . nixpkgs . follows = "hf -nix/nixpkgs" ;
1414 } ;
1515 } ;
1616 outputs =
2121 nixpkgs ,
2222 flake-utils ,
2323 rust-overlay ,
24- tgi -nix,
24+ hf -nix,
2525 } :
2626 flake-utils . lib . eachDefaultSystem (
2727 system :
3333 } ;
3434 pkgs = import nixpkgs {
3535 inherit system ;
36- inherit ( tgi -nix. lib ) config ;
36+ inherit ( hf -nix. lib ) config ;
3737 overlays = [
3838 rust-overlay . overlays . default
39- tgi -nix. overlays . default
39+ hf -nix. overlays . default
4040 ( import nix/overlay.nix )
4141 ] ;
4242 } ;
Original file line number Diff line number Diff line change @@ -13,26 +13,26 @@ final: prev: {
1313 (
1414 python-self : python-super : with python-self ; {
1515 # Python package override example:
16- transformers = python-super . transformers . overrideAttrs (
17- _ : _ : {
18- src = final . fetchFromGitHub {
19- owner = "huggingface" ;
20- repo = "transformers" ;
21- rev = "v4.51.0" ;
22- hash = "sha256-dnVpc6fm1SYGcx7FegpwVVxUY6XRlsxLs5WOxYv11y8=" ;
23- } ;
24- }
25- ) ;
26- huggingface-hub = python-super . huggingface-hub . overrideAttrs (
27- _ : _ : {
28- src = final . fetchFromGitHub {
29- owner = "huggingface" ;
30- repo = "huggingface_hub" ;
31- rev = "v0.30.0" ;
32- hash = "sha256-sz+n1uoWrSQPqJFiG/qCT6b4r08kD9MsoPZXbfWNB2o=" ;
33- } ;
34- }
35- ) ;
16+ # transformers = python-super.transformers.overrideAttrs (
17+ # _: _: {
18+ # src = final.fetchFromGitHub {
19+ # owner = "huggingface";
20+ # repo = "transformers";
21+ # rev = "v4.51.0";
22+ # hash = "sha256-dnVpc6fm1SYGcx7FegpwVVxUY6XRlsxLs5WOxYv11y8=";
23+ # };
24+ # }
25+ # );
26+ # huggingface-hub = python-super.huggingface-hub.overrideAttrs (
27+ # _: _: {
28+ # src = final.fetchFromGitHub {
29+ # owner = "huggingface";
30+ # repo = "huggingface_hub";
31+ # rev = "v0.30.0";
32+ # hash = "sha256-sz+n1uoWrSQPqJFiG/qCT6b4r08kD9MsoPZXbfWNB2o=";
33+ # };
34+ # }
35+ # );
3636 }
3737 )
3838 ] ;
You can’t perform that action at this time.
0 commit comments