-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (28 loc) · 768 Bytes
/
Makefile
File metadata and controls
29 lines (28 loc) · 768 Bytes
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
IMAGE ?= productdescriber:latest
CONTAINER ?= productdescriber
PORT ?= 8000
ENV_FILE ?= .env
OLLAMA_URL ?= http://host.docker.internal:11434
install:
poetry install --no-root
lint:
poetry run flake8 productdescriber tests --ignore=E501
pre-commit:
poetry run pre-commit run --all-files
runserver:
uvicorn productdescriber.main:app --reload
test:
poetry run pytest -vv
test-coverage:
poetry run pytest --cov=productdescriber --cov-branch \
--cov-report=term-missing:skip-covered \
--cov-report=xml:coverage.xml
docker-build:
docker build -t $(IMAGE) .
docker-run:
docker run -d --rm --name $(CONTAINER) -p $(PORT):8000 \
--env-file $(ENV_FILE) \
-e OLLAMA_URL=$(OLLAMA_URL) \
$(IMAGE)
docker-stop:
- docker stop $(CONTAINER)