I have docker setup with nvidia already. Im using 19.03 and my daemon.json has:
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
using docker command
sudo docker run --rm \
--privileged \
--shm-size=1024m \
-v gpus=all \
-v /opt/frigate:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-p 5000:5000 \
blakeblackshear/frigate:0.5.1-rc2
But it doesnt try for gpu, it sees the coral is gone and goes strraight to cpuā¦I feel like Im using the wrong version because Ive had this one running like a month. I didnt see any new versions though.
Here is the log (redacted stream urls)
da@deep:/opt$ sudo docker run --rm \
> --privileged \
> --shm-size=1024m \
> -v gpus=all \
> -v /opt/frigate:/config:ro \
> -v /etc/localtime:/etc/localtime:ro \
> -p 5000:5000 \
> blakeblackshear/frigate:0.5.1-rc2
On connect called
/arrow/cpp/src/plasma/store.cc:1226: Allowing the Plasma store to use up to 0.4GB of memory.
/arrow/cpp/src/plasma/store.cc:1253: Starting object store with directory /dev/shm and huge page support disabled
ffprobe -v panic -show_error -show_streams -of json "rtsp://10.2.2.2:7447/xxx"
Starting detection process: 38
No EdgeTPU detected. Falling back to CPU.
{'streams': [{'index': 0, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/30', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1024, 'height': 576, 'coded_width': 1024, 'coded_height': 576, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '16:9', 'pix_fmt': 'yuvj420p', 'level': 31, 'color_range': 'pc', 'color_space': 'bt709', 'color_transfer': 'bt709', 'color_primaries': 'bt709', 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '25/1', 'avg_frame_rate': '15/1', 'time_base': '1/90000', 'start_pts': 48001, 'start_time': '0.533344', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
Creating ffmpeg process...
ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://10.2.2.2:7447/xxx -f rawvideo -pix_fmt rgb24 pipe:
ffprobe -v panic -show_error -show_streams -of json "rtsp://10.2.2.2:7447/xxx"
drive: ffmpeg didnt return a frame. something is wrong.
drive: ffmpeg didnt return a frame. something is wrong.
drive: ffmpeg process is not running. exiting capture thread...
{'streams': [{'index': 0, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'profile': 'LC', 'codec_type': 'audio', 'codec_time_base': '1/48000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '48000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/48000', 'start_pts': 0, 'start_time': '0.000000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/30', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1024, 'height': 576, 'coded_width': 1024, 'coded_height': 576, 'has_b_frames': 0, 'sample_aspect_ratio': '1:1', 'display_aspect_ratio': '16:9', 'pix_fmt': 'yuvj420p', 'level': 31, 'color_range': 'pc', 'color_space': 'bt709', 'color_transfer': 'bt709', 'color_primaries': 'bt709', 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '25/1', 'avg_frame_rate': '15/1', 'time_base': '1/90000', 'start_pts': 33600, 'start_time': '0.373333', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
Creating ffmpeg process...
ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://10.2.2.2:7447/xxx -f rawvideo -pix_fmt rgb24 pipe:
Camera_process started for drive: 49
Starting process for drive: 49
Camera_process started for front: 50
Starting process for front: 50
* Serving Flask app "detect_objects" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
front: ffmpeg didnt return a frame. something is wrong.
front: ffmpeg didnt return a frame. something is wrong.
front: ffmpeg process is not running. exiting capture thread...
Creating ffmpeg process...
ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://10.2.2.2:7447/xxx -f rawvideo -pix_fmt rgb24 pipe:
Creating ffmpeg process...
ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://10.2.2.2:7447/xxx -f rawvideo -pix_fmt rgb24 pipe:
^C^CTraceback (most recent call last):
File "detect_objects.py", line 337, in <module>
main()
File "detect_objects.py", line 332, in main
object_processor.join()
File "/usr/lib/python3.7/threading.py", line 1044, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.7/threading.py", line 1060, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/usr/lib/python3.7/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 1307, in _shutdown
lock.acquire()
KeyboardInterrupt
Not sure if this will help but incaseā¦
da@deep:~$ nvidia-smi
Thu Apr 9 08:36:15 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2080 On | 00000000:07:00.0 Off | N/A |
| 24% 24C P8 3W / 245W | 57MiB / 7973MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1620 G /usr/lib/xorg/Xorg 38MiB |
| 0 1880 G /usr/bin/gnome-shell 17MiB |
+-----------------------------------------------------------------------------+
da@deep:~$
BTW - didnt make any changes to my config file, its the same as it was for the coral