@@ -6,7 +6,7 @@ SHELL := bash -eu -o pipefail
66# default goal to show help
77.DEFAULT_GOAL := help
88.PHONY : all lint build mdlint ruff fix-linter format pyright run build-dev run-dev test \
9- shell shell-vippet shell-models shell-collector shell-videogenerator stop clean clean-output-videos help \
9+ shell shell-vippet shell-models shell-model-download shell- collector shell-videogenerator stop clean clean-output-videos help \
1010 build-videogenerator build-models build-onvif-discovery docker-build env-setup \
1111 install-models-once install-models-force install-models-all \
1212 test-smoke test-full
@@ -33,7 +33,7 @@ all: lint build run test ## Run lint, build, run and test
3333
3434lint : $(VENV_DIR ) mdlint ruff pyright # # Run all linters
3535
36- MD_FILES := $(shell find . -type f \( -name '* .md' \) -not -path './.*' -print )
36+ MD_FILES := $(shell find . -type f \( -name '* .md' \) -not -path './.*' -not -path './shared/*' - print )
3737mdlint : # # Lint MD files
3838# download tool from https://github.com/igorshubovych/markdownlint-cli
3939 markdownlint --version
@@ -42,19 +42,19 @@ mdlint: ## Lint MD files
4242ruff : $(VENV_DIR ) # # Run ruff linter
4343 set +u; . ./$< /bin/activate; set -u ; \
4444 ruff --version ; \
45- # Exclude shared/scripts/ to avoid formatting user created scripts ;\
46- ruff check --exclude shared/scripts/ ; \
47- ruff format --check --exclude shared/scripts/
45+ # Exclude shared/ — runtime-mounted volume, not source code ;\
46+ ruff check --exclude shared/ ; \
47+ ruff format --check --exclude shared/
4848
4949fix-linter : $(VENV_DIR ) # # Fix linter issues using ruff
5050 set +u; . ./$< /bin/activate; set -u ; \
51- # Exclude shared/scripts/ to avoid formatting user created scripts ;\
52- ruff check --fix --exclude shared/scripts/
51+ # Exclude shared/ — runtime-mounted volume, not source code ;\
52+ ruff check --fix --exclude shared/
5353
5454format : $(VENV_DIR ) # # Format code using ruff
5555 set +u; . ./$< /bin/activate; set -u ; \
56- # Exclude shared/scripts/ to avoid formatting user created scripts ;\
57- ruff format --exclude shared/scripts/
56+ # Exclude shared/ — runtime-mounted volume, not source code ;\
57+ ruff format --exclude shared/
5858
5959pyright : $(VENV_DIR ) # # Run pyright type checker
6060 set +u; . ./$< /bin/activate; set -u ; \
@@ -69,6 +69,8 @@ generate_openapi: $(VENV_DIR) ## Generate OpenAPI schema file
6969env-setup : # # Environment setup target: always run before build/run targets that need .env and shared dirs
7070 mkdir -p shared/collector-signals && chmod o+w shared/collector-signals
7171 mkdir -p shared/models/output && chmod o+w shared/models/output
72+ mkdir -p shared/model-download/venv && chmod o+w shared/model-download/venv
73+ mkdir -p shared/model-download/cache && chmod o+w shared/model-download/cache
7274 mkdir -p shared/videos/input && chmod o+w shared/videos/input
7375 mkdir -p shared/videos/output && chmod o+w shared/videos/output
7476 mkdir -p shared/videos/video-generator && chmod o+w shared/videos/video-generator
@@ -138,17 +140,20 @@ shell-vippet: ## Open shell in vippet container
138140shell-models : # # Open shell in models container
139141 $(MAKE ) shell SERVICE=models
140142
143+ shell-model-download : # # Open shell in model-download container
144+ $(MAKE ) shell SERVICE=model-download
145+
141146shell-collector : # # Open shell in collector container
142147 $(MAKE ) shell SERVICE=collector
143148
144149shell-videogenerator : # # Open shell in videogenerator container
145150 $(MAKE ) shell SERVICE=videogenerator
146151
147152stop : # # Stop the docker compose services
148- docker compose down models collector videogenerator mediamtx vippet-ui vippet onvif-discovery
153+ docker compose down models model-download collector videogenerator mediamtx vippet-ui vippet onvif-discovery
149154
150155clean : # # Clean all build artifacts
151- rm -rf shared/collector-signals shared/models/output/ shared/onvif/onvif_cameras.json shared/videos/input shared/videos/output shared/videos/video-generator
156+ rm -rf shared/collector-signals shared/models/output/ shared/model-download/ shared/ onvif/onvif_cameras.json shared/videos/input shared/videos/output shared/videos/video-generator
152157
153158clean-output-videos : # # Clean only output videos
154159 rm -rf shared/videos/output/*
0 commit comments