Skip to content

Commit

Permalink
update makefile and docker dir
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Mar 11, 2022
1 parent 00112eb commit ffee9c8
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 2,344 deletions.
57 changes: 6 additions & 51 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,63 +1,18 @@
default_target: amd64_frigate
default_target: frigate

COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)

version:
echo "VERSION='0.11.0-$(COMMIT_HASH)'" > frigate/version.py

web:
docker build --tag frigate-web --file docker/Dockerfile.web web/

amd64_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.3-amd64 --file docker/Dockerfile.wheels .

amd64_ffmpeg:
docker build --no-cache --pull --tag blakeblackshear/frigate-ffmpeg:1.2.0-amd64 --file docker/Dockerfile.ffmpeg.amd64 .

nginx_frigate:
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate-nginx:1.0.2 --file docker/Dockerfile.nginx .

amd64_frigate: version web
docker build --no-cache --tag frigate-base --build-arg ARCH=amd64 --build-arg FFMPEG_VERSION=1.1.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.2 --file docker/Dockerfile.base .
docker build --no-cache --tag frigate --file docker/Dockerfile.amd64 .

amd64_all: amd64_wheels amd64_ffmpeg amd64_frigate

amd64nvidia_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.3-amd64nvidia --file docker/Dockerfile.wheels .

amd64nvidia_ffmpeg:
docker build --no-cache --pull --tag blakeblackshear/frigate-ffmpeg:1.2.0-amd64nvidia --file docker/Dockerfile.ffmpeg.amd64nvidia .

amd64nvidia_frigate: version web
docker build --no-cache --tag frigate-base --build-arg ARCH=amd64nvidia --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.2 --file docker/Dockerfile.base .
docker build --no-cache --tag frigate --file docker/Dockerfile.amd64nvidia .

amd64nvidia_all: amd64nvidia_wheels amd64nvidia_ffmpeg amd64nvidia_frigate

aarch64_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.3-aarch64 --file docker/Dockerfile.wheels .

aarch64_ffmpeg:
docker build --no-cache --pull --tag blakeblackshear/frigate-ffmpeg:1.3.0-aarch64 --file docker/Dockerfile.ffmpeg.aarch64 .

aarch64_frigate: version web
docker build --no-cache --tag frigate-base --build-arg ARCH=aarch64 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.2 --file docker/Dockerfile.base .
docker build --no-cache --tag frigate --file docker/Dockerfile.aarch64 .

aarch64_all: aarch64_wheels aarch64_ffmpeg aarch64_frigate

armv7_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.3-armv7 --file docker/Dockerfile.wheels .

armv7_ffmpeg:
docker build --no-cache --pull --tag blakeblackshear/frigate-ffmpeg:1.2.0-armv7 --file docker/Dockerfile.ffmpeg.armv7 .

armv7_frigate: version web
docker build --no-cache --tag frigate-base --build-arg ARCH=armv7 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.2 --file docker/Dockerfile.base .
docker build --no-cache --tag frigate --file docker/Dockerfile.armv7 .
frigate: version
DOCKER_BUILDKIT=1 docker build -t frigate -f docker/Dockerfile .

armv7_all: armv7_wheels armv7_ffmpeg armv7_frigate
frigate_push: version
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:0.11.0-$(COMMIT_HASH) --file docker/Dockerfile .

run_tests:
# PLATFORM: linux/arm64/v8 linux/amd64 or linux/arm/v7
Expand All @@ -71,4 +26,4 @@ run_tests:
@docker buildx build --platform=$(PLATFORM) --tag frigate-base --build-arg NGINX_VERSION=1.0.2 --build-arg FFMPEG_VERSION=1.0.0 --build-arg ARCH=$(ARCH) --build-arg WHEELS_VERSION=1.0.3 --file docker/Dockerfile.test .
@rm docker/Dockerfile.test

.PHONY: web run_tests
.PHONY: run_tests
7 changes: 1 addition & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ RUN pip3 wheel --wheel-dir=/wheels \
# Frigate Container
FROM debian:11-slim
ARG TARGETARCH
ARG S6_OVERLAY_VERSION=3.0.0.2

ENV DEBIAN_FRONTEND=noninteractive
ENV FLASK_ENV=development
Expand Down Expand Up @@ -117,7 +116,7 @@ WORKDIR /opt/frigate/
ADD frigate frigate/
ADD migrations migrations/

COPY --from=web /opt/frigate/build web/
COPY --from=web /opt/frigate/dist web/

COPY docker/rootfs/ /

Expand All @@ -127,10 +126,6 @@ RUN S6_ARCH="${TARGETARCH}" \
&& if [ "${TARGETARCH}" = "arm64" ]; then S6_ARCH="aarch64"; fi \
&& wget -O /tmp/s6-overlay-installer "https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${S6_ARCH}-installer" \
&& chmod +x /tmp/s6-overlay-installer && /tmp/s6-overlay-installer /
# && wget -O - "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz" \
# | tar -C / -Jxpf - \
# && wget -O - "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}-${S6_OVERLAY_VERSION}.tar.xz" \
# | tar -C / -Jxpf -

EXPOSE 5000
EXPOSE 1935
Expand Down
28 changes: 0 additions & 28 deletions docker/Dockerfile.aarch64

This file was deleted.

28 changes: 0 additions & 28 deletions docker/Dockerfile.amd64

This file was deleted.

51 changes: 0 additions & 51 deletions docker/Dockerfile.amd64nvidia

This file was deleted.

30 changes: 0 additions & 30 deletions docker/Dockerfile.armv7

This file was deleted.

55 changes: 0 additions & 55 deletions docker/Dockerfile.base

This file was deleted.

Loading

0 comments on commit ffee9c8

Please sign in to comment.