-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (38 loc) · 1.31 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
49
PORT ?= 5001
IMAGE_NAME ?= ai-dial-adapter-dial
PLATFORM ?= linux/amd64
DEV_PYTHON ?= 3.11
ARGS=
.PHONY: all install build serve clean lint format test integration_tests docker_build docker_run
all: build
install:
poetry env use python$(DEV_PYTHON)
poetry install
build: install
poetry build
serve: install
poetry run uvicorn "aidial_adapter_dial.app:app" --reload --host "0.0.0.0" --port $(PORT) --workers=1 --env-file ./.env
clean:
poetry run clean
poetry env remove --all
lint: install
poetry run nox -s lint
format: install
poetry run nox -s format
test: install
poetry run nox -s test -- $(ARGS)
docker_serve:
docker build --platform $(PLATFORM) -t $(IMAGE_NAME):dev .
docker run --platform $(PLATFORM) --env-file ./.env --rm -p $(PORT):5000 $(IMAGE_NAME):dev
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 tests'