Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
68103079
Unverified
Commit
68103079
authored
Oct 04, 2024
by
Daniël de Kok
Committed by
GitHub
Oct 04, 2024
Browse files
nix: example of local package overrides during development (#2607)
parent
3011639f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
flake.lock
flake.lock
+3
-3
flake.nix
flake.nix
+1
-0
nix/overlay.nix
nix/overlay.nix
+41
-0
No files found.
flake.lock
View file @
68103079
...
...
@@ -978,11 +978,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 172
7859277
,
"narHash": "sha256-
AsrPuQqhg8x5RRR3aX0vvDDRQb+HREq2wGxXOpZnWus
=",
"lastModified": 172
8029332
,
"narHash": "sha256-
j0RX3a67lvi2PC5w6J5DHTxM+l96J/OV5sAf34IUfUo
=",
"owner": "huggingface",
"repo": "text-generation-inference-nix",
"rev": "
14196ab62f31d005f46207f7a251f82a81d0a09f
",
"rev": "
98049f853346ca780b81fee730715c90d33ac2b4
",
"type": "github"
},
"original": {
...
...
flake.nix
View file @
68103079
...
...
@@ -37,6 +37,7 @@
overlays
=
[
rust-overlay
.
overlays
.
default
tgi-nix
.
overlays
.
default
(
import
nix/overlay.nix
)
];
};
crateOverrides
=
import
./nix/crate-overrides.nix
{
inherit
pkgs
nix-filter
;
};
...
...
nix/overlay.nix
0 → 100644
View file @
68103079
final
:
prev
:
{
# You can use this overlay to temporarily override packages for
# development. For permanent overrides, it's better to do this in
# our package flake:
#
# https://github.com/huggingface/text-generation-inference-nix
#
# Note that overriding packages that are in the transitive closure
# of many other packages (e.g. transformers) will require a large
# rebuild.
pythonPackagesExtensions
=
prev
.
pythonPackagesExtensions
++
[
(
python-self
:
python-super
:
with
python-self
;
{
# Python package override example:
# transformers = python-super.transformers.overrideAttrs (
# _: _: {
# src = final.fetchFromGitHub {
# owner = "huggingface";
# repo = "transformers";
# rev = "2bd4d5897dc73e8b172832070a6f9e567a0df017";
# hash = "sha256-JOIpKH9ssDEfI2Tf15e0iPKtThJwQ9GxMvRAnm+M2Pg=";
# };
# }
# );
}
)
];
# Non-python package override example:
#
# ripgrep = prev.ripgrep.overrideAttrs (
# _: _: {
# src = final.fetchFromGitHub {
# owner = "BurntSushi";
# repo = "ripgrep";
# rev = "79cbe89deb1151e703f4d91b19af9cdcc128b765";
# hash = "sha256-JPTM2KNmGMb+/jOfK3X7OM1wnN+3TU35SJOIcqmp3mg=";
# };
# });
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment