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.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 = {
|
||||
font = "Lat2-Terminus16";
|
||||
|
|
@ -113,6 +120,7 @@
|
|||
smartmontools
|
||||
parted
|
||||
borgbackup
|
||||
lshw
|
||||
|
||||
nil
|
||||
];
|
||||
|
|
@ -327,13 +335,18 @@
|
|||
"frigate:/config"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
"/root/frigate-models:/config/model_cache"
|
||||
];
|
||||
environment.FRIGATE_RTSP_PASSWORD = "password123";
|
||||
# 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 = [
|
||||
"--shm-size=512m"
|
||||
"--network=host"
|
||||
"--privileged"
|
||||
];
|
||||
};
|
||||
containers.netflow2ng = {
|
||||
|
|
@ -390,6 +403,9 @@
|
|||
port = 8183;
|
||||
};
|
||||
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Nix settings
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue