MLOps-Platforms / Makefile
songhieng's picture
Upload 72 files
7e825f9 verified
# 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