forked from RedHatInsights/astro-virtual-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (39 loc) · 1.37 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
50
51
52
53
54
CONTAINER_EXEC ?= podman
COMPOSE_EXEC ?= ${CONTAINER_EXEC}-compose
export IS_RUNNING_LOCALLY=1
include make/Makefile.variables.mk
include make/Makefile.test.mk
include make/Makefile.lint.mk
include make/Makefile.train.mk
include make/Makefile.hyperopt.mk
# install and train the project
install:
pipenv install --categories "packages dev-packages api-packages"
create-internal:
mkdir -p .venv-internal
python3 -m venv .venv-internal
install-internal:
if [ ! -d .venv-internal ]; then ${MAKE} create-internal; fi
. .venv-internal/bin/activate && pipenv install --categories "packages dev-packages internal-packages" --skip-lock
clean:
rm -rf results .rasa models/* .astro
# runs the assistant
run:
pipenv run ${RASA_EXEC} run ${RASA_RUN_ARGS}
run-interactive:
pipenv run ${RASA_EXEC} interactive ${RASA_TRAIN_ARGS} ${RASA_RUN_ARGS}
run-actions:
pipenv run ${RASA_ACTIONS_EXEC} --actions actions --auto-reload
run-cli:
pipenv run ${RASA_EXEC} shell ${RASA_RUN_ARGS}
run-internal:
. .venv-internal/bin/activate && ${INTERNAL_EXEC} run ${INTERNAL_RUN_ARGS}
run-db:
pipenv run make db
db:
${CONTAINER_EXEC} run --rm -it -p 5432:${DB_PORT} -e POSTGRES_PASSWORD=${DB_PASSWORD} -e POSTGRES_USER=${DB_USERNAME} -e POSTGRES_DB=${DB_NAME} --name postgres postgres:15.5
drop-db:
${CONTAINER_EXEC} stop postgres
${CONTAINER_EXEC} rm postgres
compose:
pipenv run ${COMPOSE_EXEC} up