45 lines
1.4 KiB
Makefile
45 lines
1.4 KiB
Makefile
# Copyright 2022 Mycroft AI Inc.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
.PHONY: dist install docker binaries
|
|
|
|
SHELL := bash
|
|
|
|
# linux/amd64,linux/arm64,linux/arm/v7
|
|
DOCKER_PLATFORM ?= linux/amd64
|
|
DOCKER_OUTPUT ?= --load
|
|
|
|
dist:
|
|
./build-dist.sh
|
|
|
|
install:
|
|
./install.sh
|
|
|
|
docker:
|
|
docker buildx build . -f Dockerfile --platform $(DOCKER_PLATFORM) --tag mycroftai/mimic3 $(DOCKER_OUTPUT)
|
|
|
|
docker-gpu:
|
|
docker buildx build . -f Dockerfile.gpu --tag 'mycroftai/mimic3:gpu' $(DOCKER_OUTPUT)
|
|
|
|
binaries:
|
|
echo "$(DOCKER_PLATFORM)" | sed -e 's/,/\n/g' | \
|
|
while read -r platform; do \
|
|
echo "$${platform}"; \
|
|
rm -rf "dist/$${platform}"; \
|
|
docker buildx build . -f Dockerfile.binary --platform "$${platform}" --output "type=local,dest=dist/$${platform}"; \
|
|
done
|
|
|
|
debian:
|
|
debian/build-debian.sh
|