forked from ggerganov/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into layla-server-build
- Loading branch information
Showing
265 changed files
with
97,693 additions
and
73,881 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
lib, | ||
dockerTools, | ||
buildEnv, | ||
llama-cpp, | ||
interactive ? true, | ||
coreutils, | ||
}: | ||
|
||
# A tar that can be fed into `docker load`: | ||
# | ||
# $ nix build .#llamaPackages.docker | ||
# $ docker load < result | ||
|
||
# For details and variations cf. | ||
# - https://nixos.org/manual/nixpkgs/unstable/#ssec-pkgs-dockerTools-buildLayeredImage | ||
# - https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922 | ||
# - https://nixery.dev/ | ||
|
||
# Approximate (compressed) sizes, at the time of writing, are: | ||
# | ||
# .#llamaPackages.docker: 125M; | ||
# .#llamaPackagesCuda.docker: 537M; | ||
# .#legacyPackages.aarch64-linux.llamaPackagesXavier.docker: 415M. | ||
|
||
dockerTools.buildLayeredImage { | ||
name = llama-cpp.pname; | ||
tag = "latest"; | ||
|
||
contents = | ||
[ llama-cpp ] | ||
++ lib.optionals interactive [ | ||
coreutils | ||
dockerTools.binSh | ||
dockerTools.caCertificates | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
lib, | ||
singularity-tools, | ||
llama-cpp, | ||
bashInteractive, | ||
interactive ? false, | ||
}: | ||
|
||
let | ||
optionalInt = cond: x: if cond then x else 0; | ||
in | ||
singularity-tools.buildImage rec { | ||
inherit (llama-cpp) name; | ||
contents = [ llama-cpp ] ++ lib.optionals interactive [ bashInteractive ]; | ||
|
||
# These are excessive (but safe) for most variants. Building singularity | ||
# images requires superuser privileges, so we build them inside a VM in a | ||
# writable image of pre-determined size. | ||
# | ||
# ROCm is currently affected by https://github.com/NixOS/nixpkgs/issues/276846 | ||
# | ||
# Expected image sizes: | ||
# - cpu/blas: 150M, | ||
# - cuda, all gencodes: 560M, | ||
diskSize = 4096 + optionalInt llama-cpp.useRocm 16384; | ||
memSize = diskSize; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.