i added a Google AI chip in my Home Server…

TechHut
22 Aug 202411:37

Summary

TLDRThis video script details the process of setting up a self-hosted motion-based recording (MBR) solution using FRIGATE on an unRAID server. The host installs Google Coral TPUs with a Dual TPU adapter to enhance performance for multiple camera feeds, overcoming limitations of a standard CPU. The tutorial covers hardware setup, driver installation, Docker configuration, and troubleshooting, ultimately achieving the utilization of both TPUs for improved surveillance capabilities.

Takeaways

  • 😀 The video is about setting up an NVR with FRIgate on an unRAID server.
  • 🔧 The user needed a Dual TPU adapter to utilize two PC lanes, which their existing hardware only supported one lane for.
  • 🤖 The Google Coral TPU is recommended for FRIgate as it outperforms a high-end CPU for the user's number of cameras.
  • 📦 The user initially used an Intel NUC but faced limitations due to the USB port already in use for unRAID.
  • 🛠️ The user installed a PCIe adapter to overcome the hardware limitation and successfully integrated it into their unRAID server.
  • 💻 The unRAID software center provides necessary drivers for the Coral TPU, simplifying the installation process.
  • 🔄 The user demonstrated the process of physically installing the Coral TPU into the unRAID server and configuring it within the unRAID environment.
  • 📝 The user had to adjust the FRIgate configuration file to utilize both Coral TPUs for improved performance.
  • 🔗 The video mentions the need for MQTT for linking FRIgate with Home Assistant, which the user planned to configure later.
  • 🔍 The user encountered some issues with the RTSP path configuration, which they resolved during the setup.
  • 🎉 The final result was successful utilization of both Coral TPUs with FRIgate, as confirmed by the system metrics and logs.

Q & A

  • What is the primary purpose of the server discussed in the script?

    -The server is primarily used for various tasks including Plex, image processing, and is being repurposed to function as an NVR with Frigate.

  • What does the term 'TPU' refer to in the context of the script?

    -TPU stands for Tensor Processing Unit, which is a type of hardware accelerator specifically designed to speed up machine learning tasks.

  • Why was a Dual TPU adapter necessary for the setup described in the script?

    -A Dual TPU adapter was needed because the Coral TPU unit requires two PCIe lanes, but the available hardware only supported one lane, hence the adapter to bridge this gap.

  • What is Frigate and how does it relate to the Coral TPU?

    -Frigate is a self-hosted motion-based camera recording solution. It is recommended to use with Coral TPUs for efficient encoding and processing, as it can strongly outperform a high-end CPU for the task.

  • What is the role of the 'Intel NUC' in the initial setup described?

    -The Intel NUC was initially used to test the Coral TPU unit. However, it was found that only one TPU could be accessed due to PCIe lane limitations, leading to the need for a different setup.

  • What is the 'Unraid' software mentioned in the script and its significance?

    -Unraid is a software-defined storage operating system that provides advanced features for managing data, including the ability to install plugins and Docker containers. It was used to manage the installation and operation of Frigate and the Coral TPU drivers.

  • What is the significance of the 'pcie adapter' in the final setup?

    -The PCIe adapter is crucial for the final setup as it allows the Coral TPU unit to be installed in the Unraid server, providing the necessary two PCIe lanes for both TPUs to function.

  • How does the script describe the process of installing the Coral TPU drivers on Unraid?

    -The script describes the process as involving accessing the Unraid software center, searching for 'coral', and installing the 'Coral Accelerator Module Drivers' plugin.

  • What is the importance of the 'config.yml' file in setting up Frigate?

    -The 'config.yml' file is essential for configuring Frigate. It contains settings such as device mapping, MQTT settings, and paths which need to be adjusted according to the specific hardware setup.

  • What issues were encountered during the setup process, as mentioned in the script?

    -Issues encountered included initial access to only one TPU on the Intel NUC, needing to adjust IP addresses for the RTSP path, and dealing with errors in the logs related to the real link and VR configuration.

  • How does the script conclude regarding the setup's success?

    -The script concludes that the setup was successful in utilizing both Coral TPUs with Frigate, despite some remaining log errors that need further configuration adjustments.

Outlines

00:00

🛠️ Setting Up an NVR with Coral TPUs

The speaker begins by introducing their server, which currently serves multiple purposes including running Plex and other services. They express their intention to repurpose it as an NVR using FRIGATE, a self-hosted video recording solution. The speaker humorously admits to a lack of due diligence in purchasing a Dual TPU adapter without realizing their existing hardware only supports a single lane, necessitating the adapter. They explain the need for the Google Coral TPU, which is recommended for its superior performance over high-end CPUs for video encoding, especially with multiple cameras. The Coral TPU is plugged into an Intel NUC, and the speaker navigates the process of installing the TPU on an unRAID server, including the physical installation of the PCIe adapter and the software setup through Docker.

05:02

🔧 Installing Coral Drivers and Configuring FRIGATE

The speaker proceeds to the software installation phase, starting with the Coral accelerator module drivers through the unRAID app store. They provide a brief overview of the ease of installation across different systems and share a link for necessary packages. After installing the drivers, they verify the functionality of both Coral TPUs through the system interface. The speaker then moves on to configuring FRIGATE, discussing the creation and modification of the configuration file to accommodate both Coral TPUs. They also touch on the necessity of MQTT for integration with Home Assistant and make adjustments to the configuration to reflect the new setup. The speaker saves the configuration and uploads it to the FRIGATE app, making sure to map the correct Coral devices and adjust settings for optimal performance.

10:03

📺 Finalizing FRIGATE Setup and Testing

In the final paragraph, the speaker finalizes the setup by starting the FRIGATE container and logging into the interface. They encounter some errors in the logs but are able to confirm that both Coral TPUs are being utilized, along with the GPUs. The speaker acknowledges that there is still work to be done, particularly with the RTSP path configuration, but is satisfied with the progress made in getting the Coral TPUs to work with FRIGATE. The video concludes with the speaker expressing their success in achieving the main goal of the project and signing off with well-wishes for the viewers.

Mindmap

Keywords

💡Unraid

Unraid is a specialized operating system designed for Network Attached Storage (NAS) devices. It is known for its data protection features and ability to run various server applications. In the video, the creator uses Unraid as the base for running multiple services, including Plex and FRIGATE, demonstrating its versatility and the creator's reliance on it for their server setup.

💡Plex

Plex is a popular media server software that organizes and streams video, music, and photos from a central server to various devices. The script mentions using Unraid for running Plex, indicating the server's role in managing and delivering media content within the creator's ecosystem.

💡NVR (Network Video Recorder)

An NVR is a device that records video in a digital format to a network-connected device. The video's theme revolves around setting up an NVR using FRIGATE on the Unraid server, showing the server's capability to handle video surveillance recording tasks.

💡FRIGATE

FRIGATE is a self-hosted NVIDIA Jetson AI application that continuously records a video stream and uses AI to detect events. The video details the process of installing FRIGATE on an Unraid machine, emphasizing its use for advanced video processing with AI capabilities.

💡TPU (Tensor Processing Unit)

A TPU is a specialized AI accelerator developed by Google that is designed to speed up machine learning tasks. The script discusses using a Coral TPU for the FRIGATE setup, highlighting the need for dedicated hardware to enhance AI processing for video surveillance.

💡Dual TPU Adapter

The Dual TPU Adapter is a hardware component that allows for the connection of two TPUs to a system that only supports a single lane. The creator mentions needing this adapter due to a compatibility issue with their existing hardware, illustrating the complexities of setting up advanced AI systems.

💡mVME Key

mVME Key refers to a form factor for embedded modules that can be plugged into a host system. The script mentions the Coral TPU unit requiring an mVME Key slot, showing the specific hardware requirements for integrating the TPU into the Unraid server.

💡Docker

Docker is a platform that allows developers to develop, ship, and run applications in containers. The video describes installing FRIGATE using Docker on the Unraid system, demonstrating the ease of deploying applications in a containerized environment.

💡Intel NUC

Intel NUC is a small form factor PC known for its compact size and powerful performance. The script initially mentions using an Intel NUC for testing the TPU setup, indicating its role as a test platform before integrating it into the main Unraid server.

💡Configuration File

A configuration file contains settings and parameters for applications or systems. The video discusses modifying a configuration file for FRIGATE, emphasizing the need for custom settings to tailor the application to the specific hardware and use case.

💡RTSP (Real Time Streaming Protocol)

RTSP is a network control protocol for streaming media over the internet. The script mentions adjusting RTSP paths, indicating the process of configuring video streaming parameters for the FRIGATE application to function correctly with surveillance cameras.

Highlights

The server is being repurposed for an NVR with FRIG, a self-hosted motion-based recording solution.

A Dual TPU adapter is needed due to a lack of proper research before purchasing hardware.

The Coral TPU unit is recommended for FRIG due to its superior performance compared to high-end CPUs.

The server initially had issues accessing both TPUs due to hardware limitations.

A PCIe adapter is used to overcome the single-lane limitation of the server's hardware.

The installation process involves physically installing the TPU adapter into the server.

Unraid software center provides the necessary drivers for the Coral TPUs.

The server's storage setup includes a parody drive alongside other 4TB drives.

Both Coral TPUs are successfully detected and operational after installation.

FRIG configuration requires creating a folder and config file for the setup.

MQTT is necessary for linking FRIG with Home Assistant.

The FRIG Docker container is set up with specific configuration parameters for optimal performance.

Multiple devices can be used for object detection, including the Coral accelerator and an Intel GPU.

The FRIG setup process involves adjusting IP addresses and RTSP paths for compatibility.

System metrics show GPU usage and interface speeds, indicating the utilization of both TPUs and GPUs.

Despite some errors in the logs, the installation is considered a success with both Coral TPUs operational.

The video concludes with a summary of the process and a call to action for further configuration adjustments.

Transcripts

play00:01

hey there this is a server this thing

play00:04

does a lot for me is currently my unraid

play00:06

machine right now I'm using it for Plex

play00:08

I'm using it for image I'm using it for

play00:10

a lot of things but what we're going to

play00:12

be using it for now is an NVR with frig

play00:17

and I've been meaning to do this for

play00:18

quite a while but I needed to wait for

play00:21

this guy this right here is a TPU

play00:23

adapter now why do I need an adapter

play00:25

that is because I am an idiot and I lack

play00:28

the common sense to do proper search on

play00:30

things before I buy

play00:32

them there it is it is the Dual TPU

play00:36

adapter and I have this little guy this

play00:38

is a coral little teeny tiny dual TPU

play00:42

unit specifically this goes in a mvme e

play00:45

key and the reason I need an adapter is

play00:47

because this requires two PC lanes while

play00:50

all of the uh e keys on any of the

play00:53

hardware I have only support one lane

play00:55

this right here fixes that I'm getting

play00:57

ahead of myself let's add some context

play00:59

here this right here is the frig website

play01:01

if I go to recommended Hardware it goes

play01:04

over everything that you're going to

play01:05

need to get this set up what this is

play01:07

like I kind of said is a self-hosted MBR

play01:09

solution allows you to record um there's

play01:13

different snapshots for different types

play01:15

of events and just relying on something

play01:17

like a Intel CPU so for Intel Hardware

play01:21

encoding does work but for the amount of

play01:23

cameras I have does not work very well

play01:25

we can see the interface speeds here if

play01:27

I just had a couple cameras set up i'

play01:29

just use a little like n200 Nook but I

play01:31

have quite a few this right here the

play01:34

Google Coral TPU is the recommended

play01:37

thing that they uh recommend you can see

play01:39

here it will strongly outperform a

play01:42

$2,000 CPU and it will work with any

play01:45

Coral device the most common one that

play01:47

people use is a USB but unfortunately I

play01:49

already have a USB hanging out of this

play01:51

thing for unraid and that is uh going to

play01:53

look a little messy so I got this thing

play01:55

uh plugged it into a Intel Nook

play01:57

initially and I only had access to one

play01:59

of the tpus which is why I needed this

play02:02

this I cannot plug into a Nook this is a

play02:04

little pcie adapter but fortunately this

play02:07

right here this is the uh ug green uh

play02:09

dxp 6800

play02:12

Pro this thing over here I think right

play02:15

here has a spot for me to install this

play02:17

little pcie adapter and within the ungr

play02:20

ungr unraid software Center they do have

play02:23

the drivers so I haven't tested this I

play02:26

did test this on the Nook works great I

play02:28

did it with home assistant but we're

play02:30

going to be installing it on here with

play02:32

Docker so the first part of this

play02:34

installation process is obviously

play02:35

installing it so we're just going to get

play02:37

this flight it on in and screw this down

play02:41

there we go I wish that was the easiest

play02:42

part now I got to take apart this thing

play02:45

pop out all these drives to make this

play02:47

easier to move around look at that

play02:50

casual Flex casual Flex that's the only

play02:52

one that's my parody Drive everything

play02:54

else is 4 tabt with the unrated you

play02:57

can't have anything in there bigger than

play02:58

the parody drive so I figured i' I just

play03:00

get a massive one so I can basically put

play03:02

whatever I want in here and actually be

play03:04

able to utilize that storage space

play03:06

should I do a

play03:07

spread that's how networking nerds Flex

play03:10

there it is pcie you got to take out

play03:13

these stupid rubber things you can tell

play03:15

I actually use it it's dusty there we go

play03:17

we got these little things out

play03:18

definitely not putting those back in we

play03:20

only use uh professional tools here at

play03:22

Tech cut media pop the screws out and

play03:25

let's see how easy this

play03:27

is this doesn't feel good like magnets

play03:31

I've taken apart the smaller one but

play03:32

never this

play03:37

one and there it is let's go and get

play03:39

this guy out of the way I'm trying to do

play03:42

this without having to take off the

play03:43

entire shell I think I'll be able to is

play03:46

that lined up I can't tell I'm going to

play03:48

turn on flash so I could see Focus for

play03:52

me and let's just push let's go for it

play03:54

hey will this fit back on here that

play03:57

almost might be too convenient hey I

play03:58

think I'm going be able to put this back

play04:00

on you actually hold it uppr right sweet

play04:02

so it's in that was a pretty simple

play04:05

installation of course you are going to

play04:07

need pcie to actually do this so if

play04:09

you're using a Nas you have to make sure

play04:11

that it has that or even better if you

play04:14

diyi it make your own kind of NZ chances

play04:17

are you'll have a place to put this and

play04:19

we'll be able to actually use both of

play04:21

the uh it's kind of Wiggly it should be

play04:24

fine with this we'll be able to use both

play04:26

of the chips which is nice which I

play04:28

honestly probably don't even need but I

play04:30

don't like to have Hardware that doesn't

play04:32

at least have the potential to be

play04:34

utilized and then in the future if

play04:36

something like image for example starts

play04:38

to support this I can dedicate one to

play04:40

frigate and the other to another

play04:43

application I can actually use it I know

play04:44

there's other tools other AI softwares

play04:47

that you can use with this so just to be

play04:49

able to separate both of them and have

play04:51

that option is

play04:52

cool so I'm going to go ahead and put

play04:55

these screws back in through the hard

play04:56

drivve Z put it back in the rack and uh

play04:59

see if we can detect them all right here

play05:01

we are we have our unrate server running

play05:05

and supposedly all we need to do is go

play05:08

over here to apps and search for coral

play05:12

and right here the coral accelerator

play05:15

module drivers let's open that up if you

play05:17

are not on unrated and you're on some

play05:19

other system these are really easy to

play05:21

install I'll leave a link down below

play05:23

with the packages that you'll need

play05:25

whether that be in a bluetoo system so

play05:27

on so forth so let's just click install

play05:29

and see if this is just going to work

play05:31

it's just a plugin versus a Docker

play05:33

container which is cool with me let's go

play05:37

ahead and hit done and now where is this

play05:41

going to be let's find it there it is

play05:43

coral driver let's open that up and look

play05:46

at that we have coral tp1 and coral

play05:49

tpu2 both alive and well they seem to be

play05:53

working just fine so now we're going to

play05:56

install uh frate freegate whatever and I

play05:59

know there's some things we need to do I

play06:01

might have the config already in here uh

play06:03

I have all my configs with an app data

play06:06

here this right here is a plugin that

play06:08

allows you to kind of browse your file

play06:10

system and we have frate which is cool

play06:12

uh I'm going to go ahead and get rid of

play06:14

a lot of this real quick cuz this is

play06:15

basically a fresh install but I am going

play06:17

to be keeping the config yml so if

play06:20

you're doing this for the first time

play06:21

you're going to need to create the

play06:22

folder and the config file so I'm going

play06:24

to delete those and let's take a look at

play06:27

this here we are this is a older

play06:29

configuration file I've been building a

play06:32

GitHub repository with or I've been

play06:34

slowly building it as I do things with

play06:36

all of my uh home lab stuff so if I head

play06:39

over here and go over to home lab you

play06:41

can see surveillance here we have

play06:43

freegate and this right here is my new

play06:46

config so I am going to just grab this

play06:49

entire configuration here and drop it on

play06:52

in now there is one thing we are going

play06:55

to need to change and that is up here

play06:59

where says detect you can see I was only

play07:01

using one Coral at the moment or at that

play07:04

specific moment again we see both of

play07:06

them cooking so we can't add the second

play07:08

one so I'm just going to copy this paste

play07:11

this in this is going to be Coral 2 and

play07:14

I'm assume this is one let's actually

play07:16

check that so let's open our terminal

play07:19

here within unraid and we are just going

play07:21

to run this command to see if they're

play07:24

showing up we can see both of them I'm

play07:25

pretty sure that's the same command that

play07:27

the uh guey for underr is running to

play07:30

show them and let's list these devices

play07:32

here and we have zero and one so that

play07:35

should work and obviously we'll be able

play07:36

to see that when we actually uh launch

play07:38

everything so that's said additionally

play07:40

we have mqtt this is needed if you're

play07:42

going to link it up to Home assistant I

play07:44

will change this later to get it

play07:45

connected properly since now it's going

play07:46

to be on a separate machine I can't just

play07:48

use this uh host name but let's go ahead

play07:51

and save this go back into our app data

play07:55

FR it delete this one and then let's

play07:57

upload our new one and there we go so

play07:59

now let's head over to apps and actually

play08:01

search for this uh free G and give it an

play08:05

install Okay within the setup you can

play08:07

see kind of the instructions some of the

play08:08

things I talked about which is the valid

play08:10

configuration we're going to set this to

play08:12

uh privileged so it can access the coral

play08:15

tpus and kind of skim through this here

play08:18

media path we are going to change this

play08:21

this is going to be under data NVR

play08:24

there's nothing in there right now which

play08:25

is good so user data n VR beautiful

play08:30

we're going to keep all the ports the

play08:32

same I'll change this password later and

play08:34

here is the coral mapping so like we saw

play08:37

in the terminal we're going to use this

play08:39

so the first one is going to be uh Apex

play08:42

Z and we're probably going to need to

play08:44

add another device so let's go down here

play08:48

add a device iice be tpu2 and drop this

play08:54

in make it number one add hopefully that

play08:57

works we're going to keep our Intel in

play08:59

there since it does have a actual Intel

play09:01

GPU you are able to use multiples as it

play09:03

says up here actually optionally but

play09:05

highly recommend that you can use

play09:06

multiple devices to perform object

play09:08

protection such as the coral accelerator

play09:11

and a Intel GPU so we are going to get

play09:14

rid of this Nvidia garbage remove remove

play09:17

I'm just going to keep this as is for

play09:19

now I do need to do a little bit more

play09:20

research in that let's do it let's run

play09:22

it hit apply and just like with

play09:24

installing the uh the drivers initially

play09:26

like we did if you're not doing this on

play09:28

UNR it's a simple uh Docker Docker

play09:31

compose file that you can use and

play09:33

there'll be a link to frate over here in

play09:35

all their documentation so if I go under

play09:37

like getting started it goes over just

play09:40

about everything that you are going to

play09:42

want to know and use and configuring

play09:46

this is really dependent on the hardware

play09:47

that you want to use and honestly it

play09:49

does take a whole lot of playing around

play09:51

with the configuration to actually get

play09:53

everything to work properly so do note

play09:56

that all right so I did have a little

play09:58

more work to do I had to change these uh

play10:00

IP addresses for the rtsp path to

play10:03

properly match with the actual local IP

play10:06

address of this container um if I go

play10:09

ahead and start it up here let's go into

play10:11

our logs now see if we still have

play10:15

issues regardless of those issues right

play10:17

here user and password this is my

play10:21

current administrator password so let's

play10:23

grab it head over here and paste it in

play10:26

log in and there we go and we do have

play10:28

some fees so part of it is working oh

play10:31

there's been some updates this looks

play10:32

really pretty let's head over to our

play10:34

settings real quick and go to system

play10:37

metrics here we have our GPU usage we

play10:39

have our interface speeds and

play10:41

temperatures and you can see we have

play10:43

Coral 1 and coral to so it is utilizing

play10:47

both of the tpus now which is great as

play10:51

well as the gpus so we have multiple

play10:52

things working you see it's still trying

play10:54

to figure out what's going on there I

play10:55

have a feeling that's the problem with

play10:56

the real link and VR that thing is up

play10:59

pain pain in the ass but both of them

play11:01

are showing up which was the whole point

play11:04

of everything that I'm doing so as of

play11:06

now I'm going to call this a success as

play11:08

you can see we still have a lot of

play11:10

errors in the logs uh this is not a uh

play11:13

fate or frate configuration tutorial so

play11:16

knowing I got these two working I just

play11:18

have probably some slight configuration

play11:20

changes to make to uh get all this up

play11:22

and running but we're now utilizing both

play11:24

of those uh chips which is freaking

play11:27

awesome but yeah that's how you get

play11:28

these uh Coral tpus working with fry I

play11:31

do hope you enjoyed this video hope you

play11:33

have a fantastic day and goodbye

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Coral TPUUnraid ServerPlex MediaFrigate NVRHome SurveillanceHardware SetupDIY ProjectTech TutorialMVME KeyTPU AdapterIntel NUC
هل تحتاج إلى تلخيص باللغة الإنجليزية؟