Enable NVIDIA GPU support and Frigate TensorRT
Enable hardware.graphics, nvidia.open and nvidia-container-toolkit; set xserver video driver to nvidia and enable nixpkgs.allowUnfree Update Frigate container to stable-tensorrt, add nvidia GPU device, mount model cache and add --privileged Add lshw to system packages
This commit is contained in:
parent
d065751bdb
commit
52d1afb99e
1 changed files with 18 additions and 2 deletions
|
|
@ -35,6 +35,13 @@
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
boot.zfs.forceImportRoot = false;
|
boot.zfs.forceImportRoot = false;
|
||||||
|
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
hardware.nvidia.open = true;
|
||||||
|
hardware.nvidia-container-toolkit.enable = true;
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
|
||||||
# Console and locale
|
# Console and locale
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
|
|
@ -113,6 +120,7 @@
|
||||||
smartmontools
|
smartmontools
|
||||||
parted
|
parted
|
||||||
borgbackup
|
borgbackup
|
||||||
|
lshw
|
||||||
|
|
||||||
nil
|
nil
|
||||||
];
|
];
|
||||||
|
|
@ -327,13 +335,18 @@
|
||||||
"frigate:/config"
|
"frigate:/config"
|
||||||
"/run/dbus:/run/dbus:ro"
|
"/run/dbus:/run/dbus:ro"
|
||||||
"/etc/localtime:/etc/localtime:ro"
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
|
"/root/frigate-models:/config/model_cache"
|
||||||
];
|
];
|
||||||
environment.FRIGATE_RTSP_PASSWORD = "password123";
|
environment.FRIGATE_RTSP_PASSWORD = "password123";
|
||||||
# Note: The image will not be updated on rebuilds, unless the version label changes
|
# Note: The image will not be updated on rebuilds, unless the version label changes
|
||||||
image = "ghcr.io/blakeblackshear/frigate:stable";
|
image = "ghcr.io/blakeblackshear/frigate:stable-tensorrt";
|
||||||
|
devices = [
|
||||||
|
"nvidia.com/gpu=all"
|
||||||
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--shm-size=512m"
|
"--shm-size=512m"
|
||||||
"--network=host"
|
"--network=host"
|
||||||
|
"--privileged"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
containers.netflow2ng = {
|
containers.netflow2ng = {
|
||||||
|
|
@ -390,6 +403,9 @@
|
||||||
port = 8183;
|
port = 8183;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Nix settings
|
# Nix settings
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue