2024-11-16 15:49:17 +01:00
|
|
|
# Need nvidia proprietary drivers to work
|
2024-12-15 00:29:51 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
nixpkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-16 15:49:17 +01:00
|
|
|
{
|
|
|
|
config = lib.mkIf config.frogeye.cuda {
|
|
|
|
nix.settings = {
|
|
|
|
substituters = [
|
|
|
|
"https://cuda-maintainers.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
nixpkgs.overlays = [
|
2024-12-15 00:29:51 +01:00
|
|
|
(
|
|
|
|
self: super:
|
2024-11-16 15:49:17 +01:00
|
|
|
let
|
|
|
|
pkgs_uf = import nixpkgs {
|
|
|
|
inherit (super) system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-12-15 00:29:51 +01:00
|
|
|
ctranslate2 = (
|
|
|
|
pkgs_uf.ctranslate2.override {
|
|
|
|
withCUDA = true;
|
|
|
|
withCuDNN = true;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
)
|
2024-11-16 15:49:17 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|