-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 828 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Makefile
SHELL := /bin/bash
PROJECT_PATH=$(shell pwd)
all: start
requirements:
@echo "Generate requirements.txt"
@source venv/bin/activate; ./generate_requirements.sh
install: setup
@echo "Setup virtual environment"
@python -m venv venv
@source venv/bin/activate; pip install -r requirements.txt
setup:
@if [ ! -f .env ]; then \
cp assets/templates/.env.template .env; \
fi
start:
@echo "Starting voice assistant"
@source venv/bin/activate; python -m src.main
clean:
@echo "Clean virtual environment and requirements"
@rm -f requirements.txt
@rm -rf venv
service:
@echo "Install karl as a service (Linux only)"
sed 's|PLACEHOLDER|$(PROJECT_PATH)|' assets/templates/karl.service.ini > /etc/systemd/system/karl.service
systemctl daemon-reload
systemctl enable karl.service
systemctl start karl.service