-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (56 loc) · 1.85 KB
/
Makefile
File metadata and controls
69 lines (56 loc) · 1.85 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This target runs checks on all files
quality:
ruff format --check --diff .
ruff check --diff .
mypy
# This target auto-fixes lint issues where possible
style:
ruff format .
ruff check --fix .
# Run tests for the library
test:
coverage run -m pytest tests/
# Build documentation for current version
single-docs:
sphinx-build docs/source docs/_build -a
# Update requirements.txt for the main project
lock:
uv lock
uv export --no-hashes --no-emit-project --no-default-groups --no-dev \
--no-emit-package pyro_predictor --no-emit-package pyro_camera_api_client \
--format requirements-txt -o requirements-all.txt
grep 'git+' requirements-all.txt > requirements-git.txt || true
grep -v 'git+' requirements-all.txt | grep -v 'file://' | grep -v '^-e ' | grep -v '^opencv-python==' > requirements.txt
rm requirements-all.txt
# Generate requirements and build camera API Docker image
build-api:
cd pyro_camera_api && \
uv lock && \
uv export --no-hashes --no-emit-project --no-default-groups --no-dev --format requirements-txt -o requirements-all.txt && \
grep -v '^opencv-python==' requirements-all.txt > requirements.txt && \
rm requirements-all.txt
docker build -f pyro_camera_api/Dockerfile pyro_camera_api -t pyronear/pyro-camera-api:latest
# Build the engine Docker image
build-app:
docker build . -t pyronear/pyro-engine:latest
build-lib:
uv sync --no-default-groups
build-optional-lib:
uv sync --all-groups
# Pull latest images and run the stack
run:
docker pull pyronear/pyro-engine:latest
docker pull pyronear/pyro-camera-api:latest
docker compose up -d
# Build images locally and run the stack
run_local: build-api build-app
docker compose up -d
# Get log from engine wrapper
log:
docker logs -f --tail 50 engine
# Get log from camera API wrapper
log-api:
docker logs -f --tail 50 pyro-camera-api
# Stop the stack
stop:
docker compose down