File size: 1,285 Bytes
5dcfc5c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
HOST ?= 127.0.0.1
PORT ?= 7860
FIGMENT_SMOKE_TIMEOUT_SECONDS ?= 8

.PHONY: install test run run-hosted-demo build-fts smoke-model-route smoke-local-model-route

install:
	$(PIP) install --upgrade pip
	$(PIP) install -r requirements.txt -r requirements-dev.txt

test:
	$(PYTHON) -m pytest

run:
	$(PYTHON) app.py

run-hosted-demo:
	FIGMENT_MODE=hosted MODEL_STACK=omni_native MODEL_BACKEND=hosted_omni AUDIO_BACKEND=omni_native ENABLE_AUDIO_INTAKE=true \
	$(PYTHON) -c 'from app import build_app; build_app().queue().launch(server_name="$(HOST)", server_port=$(PORT))'

build-fts:
	@if [ -f scripts/build_fts.py ]; then \
		$(PYTHON) scripts/build_fts.py; \
	else \
		echo "scripts/build_fts.py not available yet; skipping FTS build."; \
	fi

smoke-model-route:
	PYTHON_DOTENV_DISABLED=true FIGMENT_MODE=canned MODEL_STACK=omni_native MODEL_BACKEND=canned AUDIO_BACKEND=none \
	FIGMENT_SMOKE_ALLOW_NETWORK=false FIGMENT_SMOKE_TIMEOUT_SECONDS=$(FIGMENT_SMOKE_TIMEOUT_SECONDS) \
	$(PYTHON) scripts/smoke_model_route.py

smoke-local-model-route:
	FIGMENT_MODE=local MODEL_BACKEND=llama_cpp AUDIO_BACKEND=none FIGMENT_SMOKE_ALLOW_NETWORK=true FIGMENT_SMOKE_TIMEOUT_SECONDS=$(FIGMENT_SMOKE_TIMEOUT_SECONDS) \
	$(PYTHON) scripts/smoke_model_route.py