i added a Google AI chip in my Home Server…
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
🛠️ 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.
🔧 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.
📺 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
💡Plex
💡NVR (Network Video Recorder)
💡FRIGATE
💡TPU (Tensor Processing Unit)
💡Dual TPU Adapter
💡mVME Key
💡Docker
💡Intel NUC
💡Configuration File
💡RTSP (Real Time Streaming Protocol)
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
hey there this is a server this thing
does a lot for me is currently my unraid
machine right now I'm using it for Plex
I'm using it for image I'm using it for
a lot of things but what we're going to
be using it for now is an NVR with frig
and I've been meaning to do this for
quite a while but I needed to wait for
this guy this right here is a TPU
adapter now why do I need an adapter
that is because I am an idiot and I lack
the common sense to do proper search on
things before I buy
them there it is it is the Dual TPU
adapter and I have this little guy this
is a coral little teeny tiny dual TPU
unit specifically this goes in a mvme e
key and the reason I need an adapter is
because this requires two PC lanes while
all of the uh e keys on any of the
hardware I have only support one lane
this right here fixes that I'm getting
ahead of myself let's add some context
here this right here is the frig website
if I go to recommended Hardware it goes
over everything that you're going to
need to get this set up what this is
like I kind of said is a self-hosted MBR
solution allows you to record um there's
different snapshots for different types
of events and just relying on something
like a Intel CPU so for Intel Hardware
encoding does work but for the amount of
cameras I have does not work very well
we can see the interface speeds here if
I just had a couple cameras set up i'
just use a little like n200 Nook but I
have quite a few this right here the
Google Coral TPU is the recommended
thing that they uh recommend you can see
here it will strongly outperform a
$2,000 CPU and it will work with any
Coral device the most common one that
people use is a USB but unfortunately I
already have a USB hanging out of this
thing for unraid and that is uh going to
look a little messy so I got this thing
uh plugged it into a Intel Nook
initially and I only had access to one
of the tpus which is why I needed this
this I cannot plug into a Nook this is a
little pcie adapter but fortunately this
right here this is the uh ug green uh
dxp 6800
Pro this thing over here I think right
here has a spot for me to install this
little pcie adapter and within the ungr
ungr unraid software Center they do have
the drivers so I haven't tested this I
did test this on the Nook works great I
did it with home assistant but we're
going to be installing it on here with
Docker so the first part of this
installation process is obviously
installing it so we're just going to get
this flight it on in and screw this down
there we go I wish that was the easiest
part now I got to take apart this thing
pop out all these drives to make this
easier to move around look at that
casual Flex casual Flex that's the only
one that's my parody Drive everything
else is 4 tabt with the unrated you
can't have anything in there bigger than
the parody drive so I figured i' I just
get a massive one so I can basically put
whatever I want in here and actually be
able to utilize that storage space
should I do a
spread that's how networking nerds Flex
there it is pcie you got to take out
these stupid rubber things you can tell
I actually use it it's dusty there we go
we got these little things out
definitely not putting those back in we
only use uh professional tools here at
Tech cut media pop the screws out and
let's see how easy this
is this doesn't feel good like magnets
I've taken apart the smaller one but
never this
one and there it is let's go and get
this guy out of the way I'm trying to do
this without having to take off the
entire shell I think I'll be able to is
that lined up I can't tell I'm going to
turn on flash so I could see Focus for
me and let's just push let's go for it
hey will this fit back on here that
almost might be too convenient hey I
think I'm going be able to put this back
on you actually hold it uppr right sweet
so it's in that was a pretty simple
installation of course you are going to
need pcie to actually do this so if
you're using a Nas you have to make sure
that it has that or even better if you
diyi it make your own kind of NZ chances
are you'll have a place to put this and
we'll be able to actually use both of
the uh it's kind of Wiggly it should be
fine with this we'll be able to use both
of the chips which is nice which I
honestly probably don't even need but I
don't like to have Hardware that doesn't
at least have the potential to be
utilized and then in the future if
something like image for example starts
to support this I can dedicate one to
frigate and the other to another
application I can actually use it I know
there's other tools other AI softwares
that you can use with this so just to be
able to separate both of them and have
that option is
cool so I'm going to go ahead and put
these screws back in through the hard
drivve Z put it back in the rack and uh
see if we can detect them all right here
we are we have our unrate server running
and supposedly all we need to do is go
over here to apps and search for coral
and right here the coral accelerator
module drivers let's open that up if you
are not on unrated and you're on some
other system these are really easy to
install I'll leave a link down below
with the packages that you'll need
whether that be in a bluetoo system so
on so forth so let's just click install
and see if this is just going to work
it's just a plugin versus a Docker
container which is cool with me let's go
ahead and hit done and now where is this
going to be let's find it there it is
coral driver let's open that up and look
at that we have coral tp1 and coral
tpu2 both alive and well they seem to be
working just fine so now we're going to
install uh frate freegate whatever and I
know there's some things we need to do I
might have the config already in here uh
I have all my configs with an app data
here this right here is a plugin that
allows you to kind of browse your file
system and we have frate which is cool
uh I'm going to go ahead and get rid of
a lot of this real quick cuz this is
basically a fresh install but I am going
to be keeping the config yml so if
you're doing this for the first time
you're going to need to create the
folder and the config file so I'm going
to delete those and let's take a look at
this here we are this is a older
configuration file I've been building a
GitHub repository with or I've been
slowly building it as I do things with
all of my uh home lab stuff so if I head
over here and go over to home lab you
can see surveillance here we have
freegate and this right here is my new
config so I am going to just grab this
entire configuration here and drop it on
in now there is one thing we are going
to need to change and that is up here
where says detect you can see I was only
using one Coral at the moment or at that
specific moment again we see both of
them cooking so we can't add the second
one so I'm just going to copy this paste
this in this is going to be Coral 2 and
I'm assume this is one let's actually
check that so let's open our terminal
here within unraid and we are just going
to run this command to see if they're
showing up we can see both of them I'm
pretty sure that's the same command that
the uh guey for underr is running to
show them and let's list these devices
here and we have zero and one so that
should work and obviously we'll be able
to see that when we actually uh launch
everything so that's said additionally
we have mqtt this is needed if you're
going to link it up to Home assistant I
will change this later to get it
connected properly since now it's going
to be on a separate machine I can't just
use this uh host name but let's go ahead
and save this go back into our app data
FR it delete this one and then let's
upload our new one and there we go so
now let's head over to apps and actually
search for this uh free G and give it an
install Okay within the setup you can
see kind of the instructions some of the
things I talked about which is the valid
configuration we're going to set this to
uh privileged so it can access the coral
tpus and kind of skim through this here
media path we are going to change this
this is going to be under data NVR
there's nothing in there right now which
is good so user data n VR beautiful
we're going to keep all the ports the
same I'll change this password later and
here is the coral mapping so like we saw
in the terminal we're going to use this
so the first one is going to be uh Apex
Z and we're probably going to need to
add another device so let's go down here
add a device iice be tpu2 and drop this
in make it number one add hopefully that
works we're going to keep our Intel in
there since it does have a actual Intel
GPU you are able to use multiples as it
says up here actually optionally but
highly recommend that you can use
multiple devices to perform object
protection such as the coral accelerator
and a Intel GPU so we are going to get
rid of this Nvidia garbage remove remove
I'm just going to keep this as is for
now I do need to do a little bit more
research in that let's do it let's run
it hit apply and just like with
installing the uh the drivers initially
like we did if you're not doing this on
UNR it's a simple uh Docker Docker
compose file that you can use and
there'll be a link to frate over here in
all their documentation so if I go under
like getting started it goes over just
about everything that you are going to
want to know and use and configuring
this is really dependent on the hardware
that you want to use and honestly it
does take a whole lot of playing around
with the configuration to actually get
everything to work properly so do note
that all right so I did have a little
more work to do I had to change these uh
IP addresses for the rtsp path to
properly match with the actual local IP
address of this container um if I go
ahead and start it up here let's go into
our logs now see if we still have
issues regardless of those issues right
here user and password this is my
current administrator password so let's
grab it head over here and paste it in
log in and there we go and we do have
some fees so part of it is working oh
there's been some updates this looks
really pretty let's head over to our
settings real quick and go to system
metrics here we have our GPU usage we
have our interface speeds and
temperatures and you can see we have
Coral 1 and coral to so it is utilizing
both of the tpus now which is great as
well as the gpus so we have multiple
things working you see it's still trying
to figure out what's going on there I
have a feeling that's the problem with
the real link and VR that thing is up
pain pain in the ass but both of them
are showing up which was the whole point
of everything that I'm doing so as of
now I'm going to call this a success as
you can see we still have a lot of
errors in the logs uh this is not a uh
fate or frate configuration tutorial so
knowing I got these two working I just
have probably some slight configuration
changes to make to uh get all this up
and running but we're now utilizing both
of those uh chips which is freaking
awesome but yeah that's how you get
these uh Coral tpus working with fry I
do hope you enjoyed this video hope you
have a fantastic day and goodbye
تصفح المزيد من مقاطع الفيديو ذات الصلة
5.0 / 5 (0 votes)