mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Update hardware_acceleration.md
This commit is contained in:
parent
d22e25064b
commit
c4fea95a2f
@ -45,13 +45,16 @@ ffmpeg:
|
|||||||
|
|
||||||
These instructions are based on the [jellyfin documentation](https://jellyfin.org/docs/general/administration/hardware-acceleration.html#nvidia-hardware-acceleration-on-docker-linux)
|
These instructions are based on the [jellyfin documentation](https://jellyfin.org/docs/general/administration/hardware-acceleration.html#nvidia-hardware-acceleration-on-docker-linux)
|
||||||
|
|
||||||
Add `--gpus all` to your docker run command or update your compose file.
|
Additional congiguration is needed for the docker container to be able to access the Nvidia GPU and this depends on how docker is being run:
|
||||||
If you have multiple Nvidia graphic card, you can add them with their ids obtained via `nvidia-smi` command
|
|
||||||
|
#### Docker Compose
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
frigate:
|
frigate:
|
||||||
...
|
...
|
||||||
image: ghcr.io/blakeblackshear/frigate:stable
|
image: ghcr.io/blakeblackshear/frigate:stable
|
||||||
|
runtime: nvidia
|
||||||
deploy: # <------------- Add this section
|
deploy: # <------------- Add this section
|
||||||
resources:
|
resources:
|
||||||
reservations:
|
reservations:
|
||||||
@ -62,6 +65,19 @@ services:
|
|||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Docker Run CLI
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
|
--name frigate \
|
||||||
|
...
|
||||||
|
-e 'NVIDIA_VISIBLE_DEVICES'='all' \
|
||||||
|
-l 'NVIDIA_DRIVER_CAPABILITIES'='all' \
|
||||||
|
ghcr.io/blakeblackshear/frigate:stable
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Setup Decoder
|
||||||
|
|
||||||
The decoder you need to pass in the `hwaccel_args` will depend on the input video.
|
The decoder you need to pass in the `hwaccel_args` will depend on the input video.
|
||||||
|
|
||||||
A list of supported codecs (you can use `ffmpeg -decoders | grep cuvid` in the container to get a list)
|
A list of supported codecs (you can use `ffmpeg -decoders | grep cuvid` in the container to get a list)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user