mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
Update hailo installation instructions (#20847)
* Update hailo docs installation * Adjust section separation
This commit is contained in:
parent
5cf2ae0121
commit
3620ef27db
@ -94,6 +94,10 @@ $ python -c 'print("{:.2f}MB".format(((1280 * 720 * 1.5 * 20 + 270480) / 1048576
|
|||||||
|
|
||||||
The shm size cannot be set per container for Home Assistant add-ons. However, this is probably not required since by default Home Assistant Supervisor allocates `/dev/shm` with half the size of your total memory. If your machine has 8GB of memory, chances are that Frigate will have access to up to 4GB without any additional configuration.
|
The shm size cannot be set per container for Home Assistant add-ons. However, this is probably not required since by default Home Assistant Supervisor allocates `/dev/shm` with half the size of your total memory. If your machine has 8GB of memory, chances are that Frigate will have access to up to 4GB without any additional configuration.
|
||||||
|
|
||||||
|
## Extra Steps for Specific Hardware
|
||||||
|
|
||||||
|
The following sections contain additional setup steps that are only required if you are using specific hardware. If you are not using any of these hardware types, you can skip to the [Docker](#docker) installation section.
|
||||||
|
|
||||||
### Raspberry Pi 3/4
|
### Raspberry Pi 3/4
|
||||||
|
|
||||||
By default, the Raspberry Pi limits the amount of memory available to the GPU. In order to use ffmpeg hardware acceleration, you must increase the available memory by setting `gpu_mem` to the maximum recommended value in `config.txt` as described in the [official docs](https://www.raspberrypi.org/documentation/computers/config_txt.html#memory-options).
|
By default, the Raspberry Pi limits the amount of memory available to the GPU. In order to use ffmpeg hardware acceleration, you must increase the available memory by setting `gpu_mem` to the maximum recommended value in `config.txt` as described in the [official docs](https://www.raspberrypi.org/documentation/computers/config_txt.html#memory-options).
|
||||||
@ -106,14 +110,107 @@ The Hailo-8 and Hailo-8L AI accelerators are available in both M.2 and HAT form
|
|||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
|
|
||||||
For Raspberry Pi 5 users with the AI Kit, installation is straightforward. Simply follow this [guide](https://www.raspberrypi.com/documentation/accessories/ai-kit.html#ai-kit-installation) to install the driver and software.
|
:::warning
|
||||||
|
|
||||||
For other installations, follow these steps for installation:
|
The Raspberry Pi kernel includes an older version of the Hailo driver that is incompatible with Frigate. You **must** follow the installation steps below to install the correct driver version, and you **must** disable the built-in kernel driver as described in step 1.
|
||||||
|
|
||||||
1. Install the driver from the [Hailo GitHub repository](https://github.com/hailo-ai/hailort-drivers). A convenient script for Linux is available to clone the repository, build the driver, and install it.
|
:::
|
||||||
2. Copy or download [this script](https://github.com/blakeblackshear/frigate/blob/dev/docker/hailo8l/user_installation.sh).
|
|
||||||
3. Ensure it has execution permissions with `sudo chmod +x user_installation.sh`
|
1. **Disable the built-in Hailo driver (Raspberry Pi only)**:
|
||||||
4. Run the script with `./user_installation.sh`
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
If you are **not** using a Raspberry Pi, skip this step and proceed directly to step 2.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
If you are using a Raspberry Pi, you need to blacklist the built-in kernel Hailo driver to prevent conflicts. First, check if the driver is currently loaded:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lsmod | grep hailo
|
||||||
|
```
|
||||||
|
|
||||||
|
If it shows `hailo_pci`, unload it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo rmmod hailo_pci
|
||||||
|
```
|
||||||
|
|
||||||
|
Now blacklist the driver to prevent it from loading on boot:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo "blacklist hailo_pci" | sudo tee /etc/modprobe.d/blacklist-hailo_pci.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Update initramfs to ensure the blacklist takes effect:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo update-initramfs -u
|
||||||
|
```
|
||||||
|
|
||||||
|
Reboot your Raspberry Pi:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
After rebooting, verify the built-in driver is not loaded:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lsmod | grep hailo
|
||||||
|
```
|
||||||
|
|
||||||
|
This command should return no results. If it still shows `hailo_pci`, the blacklist did not take effect properly and you may need to check for other Hailo packages installed via apt that are loading the driver.
|
||||||
|
|
||||||
|
2. **Run the installation script**:
|
||||||
|
|
||||||
|
Download the installation script:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/hailo8l/user_installation.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Make it executable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chmod +x user_installation.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the script:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./user_installation.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The script will:
|
||||||
|
|
||||||
|
- Install necessary build dependencies
|
||||||
|
- Clone and build the Hailo driver from the official repository
|
||||||
|
- Install the driver
|
||||||
|
- Download and install the required firmware
|
||||||
|
- Set up udev rules
|
||||||
|
|
||||||
|
3. **Reboot your system**:
|
||||||
|
|
||||||
|
After the script completes successfully, reboot to load the firmware:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Verify the installation**:
|
||||||
|
|
||||||
|
After rebooting, verify that the Hailo device is available:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls -l /dev/hailo0
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see the device listed. You can also verify the driver is loaded:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lsmod | grep hailo_pci
|
||||||
|
```
|
||||||
|
|
||||||
#### Setup
|
#### Setup
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user