docker/main: add download-models overlay into s6 startup

This commit is contained in:
Indrek Mandre 2024-02-04 13:13:18 +02:00
parent d6ff220e45
commit 7c58c3ed4e
7 changed files with 13 additions and 0 deletions

View File

@ -197,6 +197,8 @@ EXPOSE 8555/tcp 8555/udp
# Configure logging to prepend timestamps, log to stdout, keep 0 archives and rotate on 10MB # Configure logging to prepend timestamps, log to stdout, keep 0 archives and rotate on 10MB
ENV S6_LOGGING_SCRIPT="T 1 n0 s10000000 T" ENV S6_LOGGING_SCRIPT="T 1 n0 s10000000 T"
# Do not fail on long-running download scripts
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
ENTRYPOINT ["/init"] ENTRYPOINT ["/init"]
CMD [] CMD []

View File

@ -0,0 +1,8 @@
#!/command/with-contenv bash
# shellcheck shell=bash
# Download yolov8 models when DOWNLOAD_YOLOV8=1 environment variable is set
set -o errexit -o nounset -o pipefail
python3 /opt/frigate/frigate/util/download_models.py

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/download-models/run