Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal config in installation guide #11339

Merged
merged 4 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove subsection in favour of exclusively adding a warning
  • Loading branch information
lachlanmacphee committed May 11, 2024
commit a6b48112a7f1c5b41a54a032e4d8479e856d5e7e
16 changes: 6 additions & 10 deletions docs/docs/frigate/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Frigate uses the following locations for read/write operations in the container.
- `/tmp/cache`: Cache location for recording segments. Initial recordings are written here before being checked and converted to mp4 and moved to the recordings folder. Segments generated via the `clip.mp4` endpoints are also concatenated and processed here. It is recommended to use a [`tmpfs`](https://docs.docker.com/storage/tmpfs/) mount for this.
- `/dev/shm`: Internal cache for raw decoded frames in shared memory. It is not recommended to modify this directory or map it with docker. The minimum size is impacted by the `shm-size` calculations below.

:::warning

For Frigate to start, you will need to have a valid configuration file inside your `config/` directory mentioned above. You can find a minimal reference configuration with a dummy camera on the [full reference config page](https://docs.frigate.video/configuration/reference/).
lachlanmacphee marked this conversation as resolved.
Show resolved Hide resolved

:::

#### Common docker compose storage configurations

Writing to a local disk or external USB drive:
Expand All @@ -53,10 +59,6 @@ Users of the Snapcraft build of Docker cannot use storage locations outside your

:::

### Creating a minimal configuration

For Frigate to start, you will need to have a valid configuration file inside your `config/` directory mentioned in the storage section of this page. You can find a minimal reference configuration with a dummy camera on the [full reference config page](https://docs.frigate.video/configuration/reference/).

### Calculating required shm-size

Frigate utilizes shared memory to store frames during processing. The default `shm-size` provided by Docker is **64MB**.
Expand All @@ -82,12 +84,6 @@ $ python -c 'print("{:.2f}MB".format(((1280 * 720 * 1.5 * 9 + 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.

:::warning

Before proceeding, make sure you have setup a valid, minimal configuration, or full configuration if you already know what you are doing!

:::

### 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).
Expand Down