2022-04-24 20:52:12 +02:00
|
|
|
default_target: local
|
2020-10-07 23:25:54 +02:00
|
|
|
|
2021-01-13 19:02:44 +01:00
|
|
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
2023-05-05 00:55:19 +02:00
|
|
|
VERSION = 0.12.1
|
2022-11-24 03:00:45 +01:00
|
|
|
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
|
2022-04-24 20:52:12 +02:00
|
|
|
CURRENT_UID := $(shell id -u)
|
|
|
|
CURRENT_GID := $(shell id -g)
|
2020-12-19 13:51:10 +01:00
|
|
|
|
|
|
|
version:
|
2022-11-20 14:34:12 +01:00
|
|
|
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
|
2022-04-24 20:52:12 +02:00
|
|
|
|
2022-11-20 14:34:12 +01:00
|
|
|
local: version
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --target=frigate --tag frigate:latest --load .
|
|
|
|
|
|
|
|
local-trt: version
|
|
|
|
docker buildx build --target=frigate-tensorrt --tag frigate:latest-tensorrt --load .
|
2021-05-18 07:52:08 +02:00
|
|
|
|
2022-04-24 20:52:12 +02:00
|
|
|
amd64:
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --platform linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
|
|
|
docker buildx build --platform linux/amd64 --target=frigate-tensorrt --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH)-tensorrt .
|
2022-04-24 20:52:12 +02:00
|
|
|
|
|
|
|
arm64:
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --platform linux/arm64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
2022-04-24 20:52:12 +02:00
|
|
|
|
|
|
|
armv7:
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --platform linux/arm/v7 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
2022-04-24 20:52:12 +02:00
|
|
|
|
|
|
|
build: version amd64 arm64 armv7
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
2022-04-24 20:52:12 +02:00
|
|
|
|
|
|
|
push: build
|
2022-12-30 17:53:17 +01:00
|
|
|
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) .
|
|
|
|
docker buildx build --push --platform linux/amd64 --target=frigate-tensorrt --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-tensorrt .
|
2021-01-09 18:26:46 +01:00
|
|
|
|
2022-12-07 14:47:40 +01:00
|
|
|
run: local
|
|
|
|
docker run --rm --publish=5000:5000 --volume=${PWD}/config/config.yml:/config/config.yml frigate:latest
|
|
|
|
|
2022-11-30 23:53:45 +01:00
|
|
|
run_tests: local
|
2022-12-07 14:47:40 +01:00
|
|
|
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m unittest
|
|
|
|
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m mypy --config-file frigate/mypy.ini frigate
|
2022-01-14 14:31:25 +01:00
|
|
|
|
2022-03-11 05:33:53 +01:00
|
|
|
.PHONY: run_tests
|