-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (36 loc) · 954 Bytes
/
makefile
File metadata and controls
44 lines (36 loc) · 954 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.PHONY: models build up down logs clean status rebuild
## Download ML models on host - Run only if the models are not already downloaded
models:
@if [ ! -d "hf-cache/PDF-Extract-Kit-1.0" ]; then \
echo "📦 Downloading MinerU models..."; \
python scripts/mineru-setup.py; \
else \
echo "📦 MinerU models already downloaded"; \
fi
## Build docker image
build: models
@echo "🐳 Building Docker image..."
@docker compose build --no-cache
## Start services
up: build
@echo "🚀 Starting services..."
@docker compose up -d
## Stop services
down:
@echo "🛑 Stopping services..."
@docker compose down
## Tail logs
logs:
@docker compose logs -f
## Clean everything (careful!)
clean:
@echo "🧹 Cleaning containers and images..."
@docker compose down -v
## Show status
status:
@docker compose ps
## Rebuild without cache
rebuild:
@echo "🔄 Rebuilding from scratch..."
@docker compose build --no-cache
@docker compose up -d