Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community Supported Boards Framework #7114

Merged
merged 33 commits into from
Jul 23, 2023
Merged

Community Supported Boards Framework #7114

merged 33 commits into from
Jul 23, 2023

Conversation

NickM-27
Copy link
Sponsor Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Jul 10, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit a20eb5b
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/64bd6dc57cba3200087b9b29

@skrashevich
Copy link
Contributor

Maybe it makes sense if the base branch is running on a platform for which there is a Community build - show a notification in the webUI about it?

@NickM-27
Copy link
Sponsor Collaborator Author

I think it would be difficult to know for sure what the current platform is given that frigate runs in docker.

@skrashevich
Copy link
Contributor

/proc and /sys pseudo-filesystems available in docker. For example, rPi detect is very simple:

# cat /proc/cpuinfo | tail -1
Model		: Raspberry Pi 4 Model B Rev 1.4

@NickM-27
Copy link
Sponsor Collaborator Author

I see, could make sense although frigate doesn't really have a notifications system right now.

Either way, that is outside the scope of this PR 👍

@NateMeyer
Copy link
Contributor

Is the intent to just have "local" targets for community-supported builds, or can there be tagged, cross-compileable make targets too?

@NickM-27
Copy link
Sponsor Collaborator Author

Is the intent to just have "local" targets for community-supported builds, or can there be tagged, cross-compileable make targets too?

I just forgot to add that to the Makefile 👍

Makefile Outdated Show resolved Hide resolved
@NateMeyer
Copy link
Contributor

I'd like to propose making the makefile a bit more dynamic with community builds. I think we should move the rpi targets to their own file inside the docker/build/rpi folder. This rpi.mk file would look something like this:

BOARDS += rpi

local-rpi: version local
	docker buildx build --tag frigate:latest-rpi --build-arg BASE_IMAGE=frigate:latest --load --file docker/build/rpi/Dockerfile .

build-rpi: arm64
	docker buildx build --platform linux/arm64 --build-arg BASE_IMAGE=$(IMAGE_REPO):${VERSION}-$(COMMIT_HASH) --tag $(IMAGE_REPO):${VERSION}-$(COMMIT_HASH)-rpi --file docker/build/rpi/Dockerfile .

push-rpi: build-rpi
	docker buildx build --push --platform linux/arm64 --build-arg BASE_IMAGE=$(IMAGE_REPO):${VERSION}-$(COMMIT_HASH) --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rpi --file docker/build/rpi/Dockerfile .

If these sub makefiles use the same pattern of make targets (i.e. build-{board-name} and push-{board-name}), we can include them in the top-level makefile like so:

BOARDS= #Initialized empty

include docker/build/*/*.mk

build-boards: $(BOARDS:%=build-%)

push-boards: $(BOARDS:%=push-%)

It is also possible to build any of the board-specific targets directly, such as doing make local-rpi.

Makefile Outdated Show resolved Hide resolved
@madsciencetist
Copy link
Contributor

Consider moving docker/* (excluding docker/build) into docker/build/main, as those files are all referenced exclusively by docker/build/main/Dockerfile, and then omitting the now-superfluous build directory by moving its children up a level

@NickM-27 NickM-27 force-pushed the community-boards branch 2 times, most recently from eff7440 to 410c1d3 Compare July 17, 2023 20:14
@madsciencetist
Copy link
Contributor

Consider moving requirements.txt files into docker directories as well - at least requirements-tensorrt.txt into docker/tensorrt

docker/rpi/rpi.mk Outdated Show resolved Hide resolved
@madsciencetist
Copy link
Contributor

Approved - I was able to rebase the Jetson changes elegantly on top of this.

docker/rpi/rpi.mk Outdated Show resolved Hide resolved
@blakeblackshear blakeblackshear merged commit dc44a6c into dev Jul 23, 2023
11 checks passed
@blakeblackshear blakeblackshear deleted the community-boards branch July 23, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants