File size: 1,591 Bytes
7e825f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Makefile for RoBERTa Phishing Content Detector - Lightweight Version

.PHONY: help setup build start stop restart logs clean test download-model

help: ## Show this help message
	@echo "RoBERTa Phishing Content Detector - Lightweight Deployment"
	@echo "=========================================================="
	@echo ""
	@echo "Available commands:"
	@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "  %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)

setup: ## Initial setup - download model and build images
	@echo "Setting up RoBERTa Phishing Content Detector..."
	mkdir -p logs models
	python src/scripts/download_model.py
	docker-compose build
	@echo "Setup complete! Run 'make start' to start the service."

build: ## Build Docker images
	docker-compose build

start: ## Start the application
	docker-compose up -d
	@echo "Application started!"
	@echo "API Documentation: http://localhost:8000/docs"
	@echo "Health Check: http://localhost:8000/health"

stop: ## Stop the application
	docker-compose down

restart: ## Restart the application
	docker-compose restart

logs: ## View application logs
	docker-compose logs -f roberta-phishing-detector

clean: ## Clean up containers and images
	docker-compose down -v
	docker system prune -f

test: ## Run API tests
	python src/scripts/test_api.py

download-model: ## Download the RoBERTa model
	python src/scripts/download_model.py

status: ## Check service status
	docker-compose ps

health: ## Check application health
	curl -s http://localhost:8000/health | python -m json.tool