-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (37 loc) · 1.3 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
PORT ?= 5000
IMAGE_NAME ?= ai-dial-assistant
PLATFORM ?= linux/amd64
ARGS=
.PHONY: all install build serve docker_serve clean lint format test
all: build
install:
poetry install
build: install
poetry build
serve: install
poetry run uvicorn "aidial_assistant.app:app" --reload --host "0.0.0.0" --port $(PORT) --env-file ./.env
docker_serve:
docker build --platform $(PLATFORM) -t $(IMAGE_NAME):latest .
docker run --platform $(PLATFORM) --env-file ./.env --rm -p $(PORT):5000 $(IMAGE_NAME):latest
clean:
poetry run clean
poetry env remove --all
lint: install
poetry run nox -s lint
format: install
poetry run nox -s format
# Run `make test ARGS="-v --durations=0 -rA"` to see stderr/stdout of each test.
test: install
poetry run nox -s test -- $(ARGS)
help:
@echo "===================="
@echo "build - build the source and wheels archives"
@echo "clean - clean virtual env and build artifacts"
@echo "-- LINTING --"
@echo "format - run code formatters"
@echo "lint - run linters"
@echo "-- RUN --"
@echo "serve - run the dev server locally"
@echo "docker_serve - run the dev server from the docker"
@echo "-- TESTS --"
@echo "test - run unit tests"